Uh oh!
There was an error while loading. Please reload this page.
Manage display of "Run as Task" checkbox on Tools Tab - #1072
Conversation
* In ToolsTab.tsx - define ExtendedTool interface for augmenting with execution, meta, icons - in hasMeta function, - cast tool as ExtendedTool - add getTaskSupport function - returns forbidden if input is not a tool - returns the setting of execution.taskSupport if set and valid - returns optional otherwise - in useEffect map callback - set runAsTask to true if getTaskSupport returns "required", else false - in IconDisplay instances cast tool as ExtendedTool instead of as WithIcons - hide "Run as Task" checkbox if getTaskSupport returns "forbidden" for the selected tool - disable the "Run as Task" checkbox if getTaskSupport returns "required" * In ToolsTab.test.tsx - added unit test - "should show/hide/disable run-as-task checkbox based on taskSupport" - tests checkbox checked and disabled states for "forbidden", "required", and "optional" states
Randgalt
commented
Feb 6, 2026
I can confirm the checkbox is now disabled and checked. But, we still get this behavior: #1073 |
cliffhall
commented
Feb 7, 2026
That turns out to be an SDK spec compliance gap that should be closed when modelcontextprotocol/typescript-sdk#1210 lands. |
BobDickinson
commented
Feb 21, 2026
@claude /review |
Claude finished @BobDickinson's task in 2m 24s —— View job Code Review
OverviewThis PR addresses a real UX problem: the "Run as Task" checkbox was always visible, leading users to believe any tool could be run as a task, then getting a confusing error when it couldn't. The approach — hiding/disabling the checkbox based on Issues1. Default fallback contradicts the MCP spec (significant)
// Current code - returns "optional" when taskSupport is absentreturn"optional";The MCP spec is explicit:
The current fallback of return"forbidden";// Default per MCP spec when execution.taskSupport is absentThis also makes the fix more impactful: instead of only hiding the checkbox for tools that declare 2. Missing server capability check (moderate)The MCP spec also states:
The 3. Import path inconsistency (minor)
// Changed from:}from"@/utils/metaUtils";// To:}from"../utils/metaUtils";Every other import in the file uses the 4. Misleading comment (minor)
// Type guard to detect execution.taskSupportconstgetTaskSupport=(tool: Tool|null): "forbidden"|"required"|"optional"=>{
5. |
- Default taskSupport fallback to "forbidden" per MCP spec (was "optional") - Fix import path to use @/ alias consistently - Fix misleading "type guard" comment on getTaskSupport - Extract getTaskSupport to a variable to avoid duplicate calls in render - Export ExtendedTool and import in tests instead of duplicating Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All issues have been addressed: Issue 1 (Default fallback): Fixed — Issue 2 (Server capability check): Fixed — The Issue 3 (Import path): Fixed — changed Issue 4 (Misleading comment): Fixed — updated comment to "Returns the execution.taskSupport value for a tool, defaulting to "forbidden" per MCP spec". Issue 5 (Duplicate calls): Fixed — extracted Issue 6 (Duplicated ExtendedTool): Fixed — exported All new and existing tests pass. |
BobDickinson
left a comment
There was a problem hiding this comment.
Reviewed code, tests pass, tested locally with server-everything and worked as expected.
BobDickinson
left a comment
There was a problem hiding this comment.
Sorry, meant to approve
Uh oh!
There was an error while loading. Please reload this page.
Summary
The "Run as Task" button is always available on the Tools Tab. But if a tool that cannot be run as a task has this checkbox checked when you run it, you get an error. This is confusing, because the availability of the "Run as Task" checkbox would indicate to a user that this tool could be run as a task.
execution.taskSupportsetting isforbidden.execution.taskSupportsetting isoptional.execution.taskSupportsetting isrequired.Type of Change
Changes Made
Related Issues
Testing
Test Results and/or Instructions
npx @modelcontextprotocol/server-everything@latest streamableHttpnpx @modelcontextprotocol/inspector@latestexecution.taskSupportsetting is "forbidden")execution.taskSupportsetting is "required")NOTE: We don't have a tool that has an
execution.taskSupportsetting of "optional", but it's unit tested.taskSupport == "forbidden"taskSupport == "required"Checklist
npm run prettier-fix)Breaking Changes
Nope.