We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2424438 commit a88a687Copy full SHA for a88a687
1 file changed
README.v2.md
@@ -2187,9 +2187,10 @@ already owns the original request ID.
2187
For long-running work that a client needs to cancel, prefer the experimental task API when the server supports it:
2188
2189
```python
2190
+from mcp import ClientSession
2191
from mcp.types import CallToolResult
2192
-async def cancel_long_running_tool(session):
2193
+async def cancel_long_running_tool(session: ClientSession) -> CallToolResult:
2194
# Start the tool as a task instead of blocking on call_tool().
2195
task_result = await session.experimental.call_tool_as_task(
2196
"long_running_tool",
0 commit comments