Repository navigation
Replies: 3 comments
|
Checked against 1. Registration is unconditional today. 2. The public name shape matters for your field design. 3. A plugin reaches semantics 1-3 today — measured, not inferred. The registration is I am publishing that as Two honest limits, both of which the plugin states: it sees only the public name (the raw leaf is a closure value — |
|
A published plugin now covers this gap: The seam it uses is the one your report's first semantic asks for — the tool never enters the registry. # profile: list this row BEFORE the mcp-client rows
- id: mcp-tool-filter
name: '@argszero/dsh-mcp-tool-filter'
config:
servers:
github: [list_issues, get_issue] # absent key = that server is untouched
playwright: [] # empty list = register nothing from itMount order matters and is reported rather than assumed: a loader mounts entries in profile order and What it deliberately does: allowlist by public leaf name ( Verification behind the claim:
This is a mitigation, not the fix you proposed. The right change is still a per-server |
|
Platform maintainer here (the OP context: a multi-tenant agent platform whose registry hosts the 161/71/52-tool servers) — we just shipped the same instance-shadow seam inside our platform bridge, and can add two measured data points to @argszero's report. 1. The seam holds on the older 0.1.1-rc.2 line too, and across both generations we run. Our production matrix freezes 2. The raw-leaf point is real and we hit the same edge. Our bridge (like the plugin) matches the public For anyone landing on this thread with the same need: the plugin works as advertised on our line, and the seam is also small enough (~30 lines) to embed in a host bridge if you would rather keep it inside your own plugin lifecycle. Our proposal stands as the long-term fix — the plugin (and our bridge wrapper) can be deleted the day the entry grows |
Uh oh!
There was an error while loading. Please reload this page.
Motivation
The MCP client bridge registers every tool a server's
tools/listreports(
mcp__<server>__<rawName>). Large servers make this expensive: our platform'sregistry hosts servers with 161, 71 and 52 tools, and a persona that needs
three of them still pays the full tool-schema surface in context tokens — on
128k-class windows this is a material fraction — plus measurably worse
tool-choice quality on weaker models.
Filtering is fundamentally a client-side concern: the context cost happens
at the client, and servers the client reaches directly (user-deployed, not
behind a filtering gateway) can be narrowed nowhere else.
Downstream platforms can approximate this today with
ctx.tools.restrict()per agent scope, but that path has real friction:
restrict()throws onunknown names (MCP tool sets are dynamic — drift between composition and
sync breaks the composition), it must be applied per-agent-scope after tool
sync, and the filtered tools still exist in the registry (guard-only
enforcement degrades to "visible but not callable").
Proposal
Add an optional config field to both
StdioConfigandStreamableHttpConfig:Semantics we'd propose (and would be happy to contribute):
the list are never registered — no schema in the model-facing roster, no
execution path, nothing for
tool_search-style introspection to see.serverNameis already the entry's ownconfig; the list matches the raw name from
tools/list.stays filtered; a server removing an allowed tool behaves exactly as it
does today for any tool (the registration disappears).
allowedToolsare inert(the tool simply never appears), matching how a static list must behave
against a dynamic server surface. A
failOnStartupError: trueentry whoseserver is unreachable fails exactly as today — the field is orthogonal.
health-checking a server without exposing its surface).
Non-goals
can expand them against its own catalog snapshot).
exactly these tools" case; per-user trimming is a UI concern on top).
Alternatives considered
ctx.tools.restrict()per scope: works today, but unknown-name throws +per-scope application + post-registration timing make it fragile for
dynamic MCP surfaces (details above).
per filtered server and protocol-forwarding maintenance.
user-deployed servers are unreachable.
Filed from a downstream platform built on
@deepseek-ai/dsh(MIT) — happy tocontribute the implementation if the semantics above match your intent.
All reactions