You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When registering toolkit functions that return non-standard Python objects (i.e., types not natively supported by Pydantic), MCP/fastMCP fails with a PydanticSchemaGenerationError. This error occurs because Pydantic cannot generate a schema for such custom or third-party types by default. The problem arises whenever tool registration parses output annotations involving these unsupported types.
Reason:
MCP/fastMCP automatically wraps toolkit function outputs with Pydantic models. When the output type is a non-standard or third-party object, schema generation is not supported by default, resulting in runtime errors.