server-filesystem: missing inputSchema.type breaks JSON Schema 2020-12 validators (all versions 0.6.2–2025.8.21)

Open Beginner friendly
#4,772 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
api

Research direction

Start at the @modelcontextprotocol/server-filesystem tool definitions, or any shared schema-generation helper they use, and inspect the inputSchema values returned by tools/list. Add the missing object type to each relevant schema, then verify the raw tools/list response with a strict JSON Schema 2020-12 validator. Done means every filesystem tool declares inputSchema.type as object.

Written by the indexing model from the issue text.

Description

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.

Dominant language
TypeScript
Stars
90.5k
Forks
11.7k
Avg merge
2d 2h
Merged PRs (30d)
5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from modelcontextprotocol/servers

All issues in modelcontextprotocol/servers

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.