server-filesystem: missing inputSchema.type breaks JSON Schema 2020-12 validators (all versions 0.6.2–2025.8.21)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 70/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- api
Direzione di ricerca
Inizia dalle definizioni degli strumenti di @modelcontextprotocol/server-filesystem o da qualsiasi helper condiviso per la generazione degli schemi che utilizzano, quindi esamina i valori di inputSchema restituiti da tools/list. Aggiungi il tipo oggetto mancante a ogni schema rilevante, quindi verifica la risposta grezza di tools/list con un validatore rigoroso JSON Schema 2020-12. Il lavoro è completato quando ogni strumento del filesystem dichiara inputSchema.type come object.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Every published version of @modelcontextprotocol/server-filesystem omits the type: "object" field on inputSchema for its tools' JSON Schema. Clients that validate tools/list responses strictly against JSON Schema draft 2020-12 reject the server outright with an error like:
Invalid result for tools/list: [{"code":"invalid_value","values":["object"],"path":["tools",0,"inputSchema","type"],"message":"Invalid input: expected "object""}]
Impact: In Claude Desktop specifically, this causes the filesystem server to work normally in the main chat window (which tolerates the missing field) but fail to start under the "Cowork and Code sessions" shared-pool context, which validates strictly. Log excerpt:
[filesystem] [error] Couldn't start for Cowork and Code sessions. Error: Invalid result for tools/list: ... "path":["tools","0","inputSchema","type"] ... "message":"Invalid input: expected "object""
Root cause (verified by direct inspection): Every version of the package from 0.6.2 through 2025.8.21 was checked by spawning the server and inspecting its raw tools/list JSON-RPC response directly — inputSchema.type is undefined for every tool in every version. This is not a regression introduced by a specific release; it's present from the first published version. It cannot be worked around by pinning to an older or newer version.
Suggested fix: Add type: "object" to each tool's inputSchema in the server's tool definitions (likely a one-line fix per tool, or a fix in the shared schema-generation helper if one is used).
Separately noted (different, unrelated bug): The reference server-memory package defaults its outputSchema generation to JSON Schema draft-07 dialect instead of 2020-12 (via zod-to-json-schema's default target), which trips the same class of validator for versions ≥ the release that added outputSchema. Pinning server-memory to 2025.9.25 (before outputSchema was added) avoids this.
- Lingua principale
- TypeScript
- Stelle
- 90.5k
- Fork
- 11.7k
- Merge medio
- 2g 2h
- PR unite (30g)
- 5
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di modelcontextprotocol/servers
-
Docs: `fetch` installs npm packages during a tool call, which is worth stating for deployments Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
modelcontextprotocol/servers#4830 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
modelcontextprotocol/servers#4829 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
modelcontextprotocol/servers#4812 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
modelcontextprotocol/servers#4804 · 1 commento ·
-
README gate confirmation command can be used by any commenter, bypassing the "readme: pending" gate Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
modelcontextprotocol/servers#4796 ·
Tutte le issue di modelcontextprotocol/servers
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Apertabug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
calcite-components needs triage refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Esri/calcite-design-system#15203 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
danielmiessler/LifeOS#2218 ·