You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: harden MCPDriver based on human review + MCP 1.26 SDK pass
Blocker fixes:
- tests/test_mcp_driver.py: strengthen integration test assertion for
real add(3,4) result; assert structured_content.result==7 and
content[0].text=='7' rather than bare 'is not None'
- mcp.py/_run_with_retry: handle McpError (protocol-level rejection)
immediately as DriverError; McpError is not retryable — the server
processed and rejected the request
Major fixes:
- mcp.py/discover(): paginate tools/list via _fetch_all_tools; loop on
nextCursor until exhausted to avoid silent capability truncation on
large MCP servers
- mcp_support.py/ToolSpec + discover(): forward ToolAnnotations hints
(readOnlyHint, destructiveHint, idempotentHint) to ToolSpec; derive
SafetyClass from them via _infer_safety_class(); safety_class_map still
overrides. Eliminates always-READ misclassification of destructive tools
- mcp_support.py/call_tool(): forward read_timeout_seconds from constraints
to ClientSession.call_tool(); prevents indefinite hangs over HTTP
- mcp.py/_run_with_retry: document at-least-once delivery semantics for
HTTP transport; advise callers to set max_retries=0 for WRITE/DESTRUCTIVE
- pyproject.toml: tighten mcp lower bound to >=1.6 in both [mcp] extra
and [dev] extras; ToolAnnotations, outputSchema, and nextCursor require
this release line
Minor fixes:
- mcp_support.py/ToolSpec: forward Tool.outputSchema for downstream use
by firewall budget/redaction rules
- docs/integrations.md: expand HTTP section with full async def main()
discover() + register + route example; add at-least-once warning inline
0 commit comments