Repository navigation
Replies: 1 comment
|
This gap is real and the mechanical cause is where the report says it is. I checked it against the current tree:
Our own tools can be corrected at the source; an MCP server's
- insert:
- id: mcp-schema-normalizer
name: '@argszero/dsh-mcp-schema-normalizer'
config:
mode: observe # normalize (default) | observe | off
servers: [github] # omitted = every mcp__* toolHow it attaches. It shadows Because a plugin cannot re-register another plugin's tools, the row has to be listed before the row that connects the servers; when it is mounted afterwards it lists the MCP tools it found already registered and says so, instead of reporting coverage it never had. Rules implemented (from your patch): a Two rules of yours I deliberately did not implement, and I would rather say so here than let the README read as complete:
Evidence. 58 tests against a real cordis context and the real If you would rather have this in |
Uh oh!
There was an error while loading. Please reload this page.
Observation
Tool parameter schemas that use a type list (
["boolean", "string"]),anyOforoneOfcan silently break some models. Gemini reads a type list as its first type only, so a parameter typed["boolean","string"]can never be filled with a string. We measured this by reading the last request header of 702 sessions (216 distinct tools): our own tools can be fixed at the source, but MCP servers mounted throughdsh-mcp-clientare third party, andcreateMcpToolDefinitionpasses theirinputSchemato the model unchanged (parameters: inputSchema). For example a code-search MCP server declaresanyOf [array|string, null]on its main parameters.Idea
Normalise the MCP
inputSchemato one type per node before it reaches the model, and send the arguments to the server unchanged (the narrowed schema accepts a subset of what the server accepts). The rule we run today as an out-of-tree patch:typelists lose"null"; if several types remain, pick by preference: string, array, object, number, integer, boolean.anyOf/oneOflose their null branches. If every remaining branch is an object, merge them (union of properties,requiredis the intersection). Otherwise pick one branch by the same preference. The parent's annotations win.enumlosesnull.allOfand everything else are left alone.properties,items,additionalPropertiesand$defs/definitionswith a depth bound; a non-object schema is returned as is and the normaliser never throws.This is a policy decision (it narrows what the model is shown), which is why I am posting it as an idea rather than a bug with a diff. It could also be a per-row option (for example
schema: single-type) or apply only for providers known to mishandle unions. If you would like it, I can port it topackages/mcp/mcp-client/src/tools.tswith specs.All reactions