modelcontextprotocol / modelcontextprotocol/ext-apps
Provide a consistent way for MCP Apps to know which tool invoked them
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 387
- Avg merge
- 3h 21m
- Merged PRs (30d)
- 6
Description
Is your feature request related to a problem? Please describe.
If multiple app tools are linked to the same UI resource, the rendered app may wish to know which tool was called to invoke it, e.g., to decide how to parse tool inputs/results.
The spec allows for the host to pass toolInfo in HostContext via ui/initialize, but it's an optional parameter. Tool info is not sent in any other host -> app message.
I'm curious why this parameter is optional. It seems like it ought to always be available on the host, and it seems reasonable/useful for an app to require it.
A current workaround is for the MCP server to manually include the tool name in structuredContent of the tool response, though this solution requires the app to wait until ui/notifications/tool-result even though the tool name is known by the host and server much earlier.
Describe the solution you'd like
Make toolInfo required in HostContext via ui/initialize.
Describe alternatives you've considered
The host could also send the tool name in ui/notifications/tool-input/ui/notifications/tool-input-partial.
Additional context
None.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with specification/2026-01-26/apps.mdx, especially the “host-context in mcp-ui/initialize” section, and compare it with the tool-input and tool-result notification alternatives described in the issue. Determine the protocol implications of making HostContext.toolInfo required; the work is done when the specification consistently requires the invoking tool information and the chosen message behavior is unambiguous.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100