Tool Sources
GET /api/orgs/{org_id}/tool-sources
Section titled “GET /api/orgs/{org_id}/tool-sources”List Tool Sources
List available tool sources for an org.
Returns built-in AgentDepot/system sources and any upstream MCP servers. Requires org membership.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | ToolSourcesResponse |
| 422 | Validation Error | HTTPValidationError |
GET /api/orgs/{org_id}/tool-sources/scopes
Section titled “GET /api/orgs/{org_id}/tool-sources/scopes”List Grantable Scopes
Return the set of coarse capability/integration scopes grantable to an agent.
Enumerates all org tools via the same gateway discovery path used by
GET /tool-sources/tools, then groups them by core/scope to
produce a short list of toggles the UI renders in the agent scope selector.
Core group — always-on tools (ToolDefinition.core == True). Shown
read-only; never stored in Agent.allowed_tools.
Scope items — one item per distinct non-null scope string encountered
across all non-core tool definitions. Each item carries the scope string
(the value to store in Agent.allowed_tools when toggled on), a human
label, the source kind discriminator, and the tool count + slug list for
tooltip/expand.
Requires org membership (JWT bearer or agd_* API token).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | GrantableScopesResponse |
| 422 | Validation Error | HTTPValidationError |
GET /api/orgs/{org_id}/tool-sources/tools
Section titled “GET /api/orgs/{org_id}/tool-sources/tools”List Tools
List all individual tools available for an org.
Delegates to :class:~agentdepot_agents.tool_gateway.gateway.ToolGateway
for unified discovery across system, custom, upstream MCP, and native
integration tool sources. Requires org membership.
The response is additive-compatible: name, source, and
description are byte-identical to the pre-gateway shape; slug,
backend_ref, access_level, is_terminal, and is_pausable
are new additive fields.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | ToolListResponse |
| 422 | Validation Error | HTTPValidationError |
POST /api/orgs/{org_id}/tool-sources/tools/refresh
Section titled “POST /api/orgs/{org_id}/tool-sources/tools/refresh”Refresh Tools
Force-refresh the org’s upstream MCP tool cache and return the full tool list.
Reconnects to all the org’s upstream MCP servers, re-enumerates their tools,
and persists the refreshed definitions to the per-integration cache. Returns
the same tool list shape as GET /tool-sources/tools.
Per-server failures inside enumeration are isolated — a dead server simply contributes no tools and its prior cache is left untouched; the endpoint still returns 200 with whatever tools resolved.
Requires org membership (JWT bearer or agd_* API token).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | ToolListResponse |
| 422 | Validation Error | HTTPValidationError |