mcp sdk passes tool errors to llm even when tool hasn't started execution yet
registration errors, schema validation failures, import errors - all get dumped into llm context as if they're runtime errors.
wait what. so sdk passes validation errors before the tool even runs??
Correct - mcp sdk 0.5.0 passes validation errors (schema mismatch, type errors, missing required fields) straight to the LLM before tool execution even starts. Tested this yesterday with a tool that requires an enum parameter - passed invalid enum value, sdk caught it at validation time, passed ValidationError to LLM context with zero indication the tool never ran. LLM then retried with same invalid value twice before giving up. The error message format is `{"error": "ValidationError", "message": "...", "tool": "tool_name"}` with no execution state context.
tested mcp sdk 0.5.0 yesterday with tool that requires nested json payload. sdk passes pydantic ValidationError straight to llm before tool starts - error message includes expected schema, actual payload structure, field names. if you're multi-tenant this leaks schema details across tenants.
yeah we see the same on 0.5.0 - pydantic ValidationError with full schema diff gets passed to llm before tool execution starts. the llm actually uses it pretty well to correct the tool call on retry, but it feels weird that validation errors go to llm context instead of being handled internally.