Files
Max Isbey ab24c34d89 Address review: keep three anticipated failures out of the crash path, docs sweep
- pre_parse_json leaves a string alone when json.loads refuses it with
  something other than JSONDecodeError (over-long integer, deep nesting),
  so validation rejects it as a bad argument instead of it surfacing as a
  crash with a traceback per request.
- convert_result skips output-schema validation for a returned
  CallToolResult(is_error=True); an error result has no structured content
  to check, and the author's message now reaches the client as written.
- read_resource checks that Resource.read() returned str or bytes, so a
  mistyped custom resource is logged as a crash and answered with -32603
  rather than "Invalid request parameters" with no log record.
- Docs and examples that still said "raise any exception and the model
  reads it" now say ToolError; deprecated.md lists the deprecated
  FuncMetadata helper; docstrings spell out the MCPError carve-out and the
  nested-crash __cause__.
- Two tests tightened: the prompt argument-validation test proves the body
  never ran, and the invalid-types check asserts on validate_arguments.
2026-08-21 16:23:48 +00:00
..
2024-09-24 22:04:19 +01:00