Allows passing input as a query param like other options from the demo app#663
Open
katerberg wants to merge 1 commit into
Open
Allows passing input as a query param like other options from the demo app#663katerberg wants to merge 1 commit into
katerberg wants to merge 1 commit into
Conversation
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.
Add an input URL query parameter to the basic-host harness so developers can pre-fill tool arguments and bookmark specific tool calls that auto-fire on page load.
Motivation and Context
The basic-host harness already supports
?server=name&tool=name&call=trueto auto-select a server/tool and call it on load. However, the tool input always resets to the schema's default values, so developers have to manually paste arguments into the textarea every time they reload. This is especially tedious when iterating on MCP App cards that need specific arguments (e.g. start_analysis with a particular question). Adding?input={"question":"..."}lets developers bookmark a fully configured tool call URL that fires on load with the exact arguments they want with no manual steps needed and minimal maintenance burden for the very kind developers that are maintaining this.I know you don't appreciate new examples being added for the maintenance costs. Hopefully this one is a small enough change to an existing example that it can pass the sniff test that this is just making life a little easier.
How Has This Been Tested?
Tested locally against an MCP server running at localhost:3001. Verified:
?input={"question":"test"}pre-fills the textarea with the provided JSON on loadBreaking Changes
None. The input parameter is optional and defaults to null. When absent, all behavior is identical to before. The initialInput prop on CallToolPanel is optional with a null default.
Types of changes
Checklist
Additional context