docs: add server-side tool error handling documentation by felixweinberger · Pull Request #2129 · modelcontextprotocol/python-sdk

@felixweinberger

Add an 'Error Handling' subsection to the Tools section of docs/server.md
covering three approaches: raising ToolError, unhandled exception
auto-conversion, and returning CallToolResult(isError=True) directly.
Includes a runnable example at examples/snippets/servers/tool_errors.py.

@felixweinberger marked this pull request as ready for review

February 23, 2026 22:24

@felixweinberger

@felixweinberger

maxisbey