MCP Tool Enablement API¶
Per-server control over which downstream MCP tools are usable. A server's OWNER can disable individual tools; disabled tools are hidden from discovery (discover_servers) and rejected by the gateway (execute_tool). All tools are enabled by default.
Table of Contents¶
- Concepts
- API Route Prefix
- API Endpoints
- 3.1. Get Server Tools
- 3.2. Update Server Disabled Tools
- Access Control
- Enforcement & Scope
- Data Models
- Error Response Format
Concepts¶
- Per-server, not per-user. The disabled-tools list belongs to the server. It is the same for every consumer of that server — there is no per-user or per-(user, server) override.
- Denylist, enabled by default. Only explicitly disabled tools are off. A tool absent from the list is enabled. A brand-new server has an empty list.
- Keyed by downstream
mcpToolName. Entries are the raw downstream tool names (themcpToolNamefield insideconfig.toolFunctions), the same identifierexecute_toolsends to the downstream server. - Validated against the cached snapshot. Updates are validated against the server's cached
config.toolFunctions; no live downstreamtools/listcall is made during the request. Submitted names that are not current tools are silently dropped, not rejected. - Self-pruning. A capabilities refresh that removes or renames a tool downstream drops the now-stale name from the disabled list automatically.
API Route Prefix¶
API Endpoints¶
1. Get Server Tools¶
Returns the server detail, including the full tool catalog and the current disabled-tools list.
Access: requires VIEW permission on the server.
Response (ServerDetailResponse, camelCase) — relevant fields:
{
"id": "000000000000000000000001",
"serverName": "github",
"toolFunctions": { "search_repositories_mcp_github": { "...": "..." } },
"disabledTools": ["delete_repository"],
"...": "..."
}
disabledTools:string[]— downstream tool names currently disabled. Empty for a server with no disabled tools.
2. Update Server Disabled Tools¶
Full-replaces the disabled-tools list.
Access: requires SHARE permission (OWNER only).
Request (ServerToolsUpdateRequest):
disabledTools:string[]— the complete replacement list. To re-enable a tool, submit a list that no longer contains it. Names that are not current tools are silently dropped.- Last-write-wins: there is no optimistic concurrency control (consistent with
PATCH /servers/{server_id}).
Response: the updated ServerDetailResponse (same shape as the GET above).
Access Control¶
| Endpoint | Required permission | Roles |
|---|---|---|
GET /servers/{server_id}/tools | VIEW | VIEWER, EDITOR, OWNER |
PATCH /servers/{server_id}/tools | SHARE | OWNER only |
SHARE is the bit exclusive to RoleBits.OWNER. A VIEWER or EDITOR calling PATCH receives 403 Forbidden.
Enforcement & Scope¶
Disabling a tool takes effect on both discovery paths:
discover_servers(vector search) filters out disabled tools via a Weaviatetool_enabled == Trueproperty filter. Disabled tools do not appear in results (unless the caller setsinclude_disabled=true, which also surfaces disabled servers today).execute_tool(gateway) checks the authoritative MongoDB document and returns aCallToolResultwithisError=truefor a disabled tool, before any downstream network call.
⚠️ Not enforced in direct-connect proxy mode. Requests that reach a downstream server through the transparent proxy (
/proxy/...) are not filtered against this list — that route only performs ACL and telemetry, and enforcing the denylist there would require intercepting and rewriting the downstreamtools/listresponse, breaking its "almost transparent proxy" contract. Treat this list as governing discovery and theexecute_toolgateway, not as a hard capability boundary across every connection mode. This is a known, accepted gap for this version.
Consistency: MongoDB is authoritative and strongly consistent (execute_tool reads it directly). The Weaviate tool_enabled property is updated best-effort after the write, so a just-disabled tool may briefly still appear in discover_servers results — it is still rejected at execute_tool.
Data Models¶
registryDisabledTools on ExtendedMCPServer (collection mcpservers, root level):
registryDisabledTools: list[str] = Field(
default_factory=list,
description="Downstream tool names (mcpToolName) disabled by this server's OWNER.",
)
Exposed in the API as disabledTools. Registry-only field; not shared with the Chat (jarvis-api) Mongoose schema or the mongoose-to-beanie generation pipeline.
Error Response Format¶
Errors follow the shared route convention:
| Status | When |
|---|---|
403 Forbidden | Caller lacks SHARE (PATCH) or VIEW (GET) on the server |
404 Not Found | server_id does not exist |
400 Bad Request | Malformed request body |
500 Internal Server Error | Unexpected failure |
Submitting an unknown tool name is not an error — it is silently dropped and the request succeeds.