Repository navigation
Conversation
With tasks disabled, a 2025-11-25 tools/call carrying `task` was refused with -32601, a `taskSupport: 'required'` tool could never be called, and tools/list still advertised `execution.taskSupport`. The spec requires a receiver that does not declare the task capability for a request type to process it normally, ignoring task metadata. When tasks are not declared to the client (no task store, or a revision before 2025-11-25), tools/call now ignores `task` and skips the taskSupport checks, and tools/list omits `execution.taskSupport`. Fixes #339 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LmhsFjk8W96X2PvmShmDm9
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
With tasks disabled (no
enableTasks, so no task store), a 2025-11-25tools/callthat carriedtaskwas refused with-32601 "Tasks are not enabled on this server". A tool markedtaskSupport: 'required'could never be called, andtools/liststill advertisedexecution.taskSupporteven thoughcapabilities.taskswas not declared.The 2025-11-25 tasks spec (
spec/tasks.md) says:execution.taskSupportis defined as "a fine-grained layer in addition to capabilities", so withouttasks.requests.tools.callit does not apply.Fix (
src/handlers.ts)tasksDeclaredTo(dependencies), returns true when a task store exists and the negotiated revision supports tasks, which is exactly whentasks.requests.tools.callwas declared to this client.handleToolsCall: when tasks are not declared,taskis ignored. Its ttl is not validated and the call never takes the task path.resolveTaskAugmentationis skipped, so neither theforbiddennor therequiredrule applies. The older-revision case already ignoredtask, and it now goes through the same predicate. One side effect: arequiredtool called by a pre-2025-11-25 client on a server with tasks enabled now runs normally instead of returning-32601. That client was never told about tasks, andtrimDefinitionToRevisionalready stripsexecutionfrom itstools/list, so this is the same spec rule.handleToolsList: when tasks are not declared,execution.taskSupportis removed, andexecutionis dropped if nothing else is left in it.taskSupporthas no effect withoutenableTasks.Not changed: the in-process
app.mcpCallTool()API still refusesrequiredtools withtask-required. It is a programmatic entry point, not the protocol, andtest/mcp-call-tool.test.tspins that behaviour.Tests
test/tasks.test.ts, new suite "task metadata with tasks disabled": atools/callwithtask: { ttl: 5000 }returns the tool result.taskis ignored on a tool without task support and with an invalid ttl. Arequiredtool can be called directly.tools/listcarries notaskSupport.test/revision-behavior.test.ts: a 2025-03-26 client can call arequiredtool on a server with tasks enabled, and a 2025-11-25 client still gets-32601.npm run lint,npm run typecheckand the fullnpm run testpass (771/771).Fixes #339
🤖 Generated with Claude Code
https://claude.ai/code/session_01LmhsFjk8W96X2PvmShmDm9