Skip to content

Underspecified Tool Type #528

Description

@000-000-000-000-000

Issue

In the Typescript SDK ToolSchema (Tool in Python SDK) has a different inputSchema shape (https://github.com/modelcontextprotocol/typescript-sdk/blob/main/src/types.ts#L764-L768) than Tool in Python SDK (https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/types.py#L715). It looks like Tool is underspecified in Python SDK as it is defining inputSchema as an arbitrary dict[str, Any]. By contrast in Typescript SDK inputSchema always has type and properties fields. All the examples here: https://modelcontextprotocol.io/docs/concepts/tools also have type and properties fields.

Proposal

Ideally we would update Python SDK to conform to the inputSchema contract if it is intended to be as strict as that of Typescript. Since this is a backwards incompatible change we should consider how we want to roll this out. More generally with a fast-growing protocol like this we should think through the right way to make these kinds of changing (major versions maybe the best approach).

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