Open
Description
Describe the bug
The MCP documentation states that we can declare annotations in the @mcp.tool()
decorator with the Python SDK, however this functionality is not present in the code.
Documentation:
https://modelcontextprotocol.io/docs/concepts/tools#python
Location in code base:
https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/server/fastmcp/server.py#L262
To Reproduce
Steps to reproduce the behavior:
- Decorate a function with
<fastMCP server name>.tool(annotations={"example":"example_val"})
- Run the MCP Server in Claude Desktop
- This should populate the logs with the following error:
TypeError: FastMCP.tool() got an unexpected keyword argument 'annotations'
Expected behavior
This should be valid and add annotation data to the tool.
Desktop (please complete the following information):
- OS: MacOS
- Version 15.3.2
- Python 3.12.7
- mcp[cli] 1.6.0
Metadata
Metadata
Assignees
Labels
No labels