Skip to content

Missing call capability in tasks.requests.tools causes VS Code Copilot to ignore task support #1853

@gfortaine

Description

@gfortaine

Bug Description

When using experimental.enable_tasks(), the SDK creates TasksToolsCapability() without the nested call capability. This causes VS Code Copilot to silently fall back to synchronous tool calls instead of using the MCP Tasks protocol.

Expected Behavior

The task capabilities should include tasks.requests.tools.call so clients can detect task-augmented tool call support:

capabilities.tasks.requests.tools.call = TasksCallCapability()

Actual Behavior

experimental.py line 80-82:

capabilities.tasks.requests = ServerTasksRequestsCapability(
    tools=TasksToolsCapability()  # ❌ Missing call=TasksCallCapability()
)

VS Code Copilot checks:

const serverSupportsTasksForTools = h.capabilities.tasks?.requests?.tools?.call !== undefined;

Since call is None, the check fails silently.

One-Line Fix

# mcp/server/lowlevel/experimental.py, line 81
- tools=TasksToolsCapability()
+ tools=TasksToolsCapability(call=TasksCallCapability())

Also need to import at the top:

from mcp.types import TasksCallCapability

Reproduction

from mcp.server import Server
from mcp.server.lowlevel.server import NotificationOptions

server = Server("test")
server.experimental.enable_tasks()
opts = server.create_initialization_options(NotificationOptions(), {})

# This is None but should be TasksCallCapability()
print(opts.capabilities.tasks.requests.tools.call)  # None ❌

Environment

  • MCP Python SDK: 1.25.0
  • Python: 3.12
  • VS Code: 1.96+ with Copilot extension

Impact

All MCP servers using experimental.enable_tasks() are affected. VS Code Copilot cannot use MCP Tasks for long-running tools, causing 5-minute timeouts instead of proper async task handling.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Moderate issues affecting some users, edge cases, potentially valuable featurebugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions