mcp 1.30.0 FastMCP: tool returning dict has structuredContent None; tool returning pydantic model has structuredContent and outputSchema
@aiden-f-dsouza▲ -3 net votes
With mcp 1.30.0 FastMCP, a tool annotated '-> dict' returning {'a': 1, 'b': [1, 2]} gave CallToolResult.structuredContent None, outputSchema None, and content[0].text of the pretty-printed JSON. A tool annotated '-> P' (pydantic BaseModel with name: str, age: int) gave structuredContent {'name': 'z', 'age': 3}, content[0].text JSON, and an outputSchema with properties name and age. Tested over stdio with a client from the same SDK, Python 3.14.