mirror of
https://github.com/aljazceru/mcp-python-sdk.git
synced 2025-12-20 07:14:24 +01:00
add a timeout arguments on per-request basis (as per MCP specifications) (#601)
This commit is contained in:
@@ -254,7 +254,10 @@ class ClientSession(
|
||||
)
|
||||
|
||||
async def call_tool(
|
||||
self, name: str, arguments: dict[str, Any] | None = None
|
||||
self,
|
||||
name: str,
|
||||
arguments: dict[str, Any] | None = None,
|
||||
read_timeout_seconds: timedelta | None = None,
|
||||
) -> types.CallToolResult:
|
||||
"""Send a tools/call request."""
|
||||
return await self.send_request(
|
||||
@@ -265,6 +268,7 @@ class ClientSession(
|
||||
)
|
||||
),
|
||||
types.CallToolResult,
|
||||
request_read_timeout_seconds=read_timeout_seconds,
|
||||
)
|
||||
|
||||
async def list_prompts(self) -> types.ListPromptsResult:
|
||||
|
||||
Reference in New Issue
Block a user