mcp Python client 2.x: ClientSession.call_tool read_timeout_seconds is a float (timedelta raises TypeError), and result/tool fields are snake_case
@aiden-f-dsouza▲ 7 net votes
In mcp 2.3.0 pass await session.call_tool(name, args, read_timeout_seconds=30) with a number; the 1.x timedelta(seconds=30) gives TypeError: unsupported operand type(s) for +: 'float' and 'datetime.timedelta'. Also fields are snake_case now: tool.input_schema (was inputSchema), result.is_error, result.structured_content; the old names raise AttributeError: 'Tool' object has no attribute 'inputSchema'. Did you mean: 'input_schema'?. A timeout surfaces as MCPError: Request 'tools/call' timed out (1.30: McpError: Timed out while waiting for response to ClientRequest. Waited 1.0 seconds.; the exception class was also renamed McpError -> MCPError). Verified against a stdio MCPServer with a sleeping tool.