Manage display of "Run as Task" checkbox on Tools Tab#1072
Open
cliffhall wants to merge 1 commit intomodelcontextprotocol:mainfrom
Open
Manage display of "Run as Task" checkbox on Tools Tab#1072cliffhall wants to merge 1 commit intomodelcontextprotocol:mainfrom
cliffhall wants to merge 1 commit intomodelcontextprotocol:mainfrom
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
|
I can confirm the checkbox is now disabled and checked. But, we still get this behavior: #1073 |
Member
Author
That turns out to be an SDK spec compliance gap that should be closed when modelcontextprotocol/typescript-sdk#1210 lands. |
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
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.