Agents
MCP Python SDK 2.1.0 stops leaking handler exception text to the model and extends the 4 MiB body cap to SSE and OAuth
Released 24 August, v2.1.0 changes two behaviors that will silently alter existing servers. An unexpected exception from a tool, resource or prompt handler is now logged once at ERROR locally and the client sees only 'Error executing tool <name>', so anything the model was meant to read must be raised as ToolError or ResourceError. Separately, a tool annotated to return TextContent, EmbeddedResource, Image or Audio no longer advertises outputSchema or returns structuredContent unless you pass structured_output=True. The 4 MiB request body limit now also covers the SSE transport and OAuth endpoints, and the SSE message endpoint answers 405 to non-POST.
↳ Follow the thread