Backport: Add missing TasksCallCapability to v1.x by BabyChrist666 · Pull Request #2137 · modelcontextprotocol/python-sdk

Summary

Cherry-pick of #1854 to the v1.x release branch.

The fix adds the missing call=TasksCallCapability() parameter to TasksToolsCapability() in ExperimentalHandlers.update_capabilities(). Without this, MCP clients that check for the call capability before invoking task-enabled tools will skip them, since the server advertises tools: {} instead of tools: {call: {}}.

This fix is on main since Jan 15 but was not included in v1.26.0 because the release was cut from v1.x before the backport. See #1995 for the user report.

Changes

  • src/mcp/server/lowlevel/experimental.py: Add TasksCallCapability import and pass call=TasksCallCapability() to TasksToolsCapability()
  • tests/experimental/tasks/server/test_run_task_flow.py: Add assertions verifying the nested call capability is present

Test plan

  • Cherry-pick applies cleanly (no conflicts)
  • CI passes on v1.x branch
  • Existing task flow tests cover the capability advertisement

Fixes #1995

🤖 Generated with Claude Code