Skip to content

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

Description

@CraigBetx

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions