fix(fastmcp): respect is_error tool results

Closed
FE
6mo ago
+49-0

Summary

  • handle FastMCP tool results with is_error=True in direct_call_tool()
  • map the error result through tool_error_behavior so non-retryable tool errors do not silently bypass policy
  • add focused regression tests for both model_retry and error behaviors

Closes #5217

Testing

  • uv run pytest tests/test_fastmcp.py -k "is_error_result or error_behavior"