Commit df31a06
committed
Add missing TasksCallCapability to enable proper MCP task support
The enable_tasks() method was creating TasksToolsCapability without
the required nested call capability. This caused VS Code Copilot and
other MCP clients to fail their capability detection check
(tasks?.requests?.tools?.call !== undefined), silently falling back
to synchronous tool calls instead of using the proper asynchronous
MCP Tasks protocol.
This fix:
- Imports TasksCallCapability from mcp.types
- Passes call=TasksCallCapability() when creating TasksToolsCapability
- Adds unit test to verify the nested capability is properly set
Without this fix, long-running tools would timeout after 5 minutes
instead of receiving proper asynchronous task handling.
Github-Issue: #18531 parent 0da9a07 commit df31a06
File tree
2 files changed
+6
-1
lines changed- src/mcp/server/lowlevel
- tests/experimental/tasks/server
2 files changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | | - | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
230 | 234 | | |
231 | 235 | | |
232 | 236 | | |
| |||
0 commit comments