Repository navigation
feat(devserver-cli): send server instructions for the app tools in the MCP initialize result (backport #25369) - #25509
Open
mergify[bot] wants to merge 2 commits into
Open
mergify[bot] wants to merge 2 commits into
mergify[bot] wants to merge 2 commits into
Conversation
Merged
2 of 4 tasks
Contributor
|
|
Closed
1 task done
agneszitte
requested review from
MartinZikmund,
Xiaoy312,
ajpinedam,
carldebilly,
kazo0 and
ramezgerges
November 3, 2026 10:59
Contributor
Author
|
Tick the box to add this pull request to the merge queue (same as
|
Member
|
@Mergifyio rebase |
…e MCP initialize result The stdio proxy sent no ServerInstructions, so nothing told a client how the uno_app_* tools are meant to be used beyond the tool descriptions; the Uno.UI.App.Mcp add-in's own instructions cannot be forwarded because initialize answers before the host is connected. FieldCheck sessions restarted the app 17 to 26 times each and asked Hot Reload 1 to 10 times, while the Dart MCP server's two-sentence instructions keep a Flutter agent on hot reload. The text states: start with uno_app_start, confirm an edit with uno_app_hot_reload_status then uno_app_find_elements, start again only for arguments, platform, data, Release or a RudeEdit, close with uno_app_close, and the discover/execute path for clients that list only the meta tools. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_017KfqeYY7rsu5aiXBNtzsDQ (cherry picked from commit e5322e3)
…rt, with a fallback for older add-ins uno_app_start does not stop a running app, and the add-in's RudeEdit result names uno_app_restart. The proxy serves any add-in version and 1.4 has no uno_app_restart, so the text names close-then-start for that case. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015hsUAwwK5wrG9pkfJK9iJa (cherry picked from commit af77948)
Contributor
Author
✅ Branch has been successfully rebased |
carldebilly
force-pushed
the
mergify/bp/servicing/6.8/pr-25369
branch
from
November 25, 2026 19:37
8bdffee to
ce21503
Compare
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
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.
GitHub Issue: closes #25498 (related to unoplatform/uno.app-mcp#191)
PR Type:
✨ Feature
What changed? 🚀
The
uno.devserver --mcp-appstdio proxy sent noServerInstructions, so a client such as Claude Code learned how theuno_app_*tools are meant to be used only from tool descriptions, read once inside a 20k-character catalog, and from whatever skill it loaded. TheUno.UI.App.Mcpadd-in sets instructions on the host's MCP server, but the proxy cannot forward them:initializeis answered before the upstream host is connected.Measured effect, from the FieldCheck comparisons in
unoplatform/private(tools/skill-ab, runs of 2026-10-09 and 2026-10-10): the Uno agent calleduno_app_start17 to 26 times per session and askeduno_app_hot_reload_status1 to 10 times; 27 of 73 restarts after the first start followed nothing but.xaml/.csedits. The Flutter agent on the same brief usedhot_reload13 times per session; what drives it is the Dart MCP server's two-sentenceinstructions("After completing Dart/Flutter code changes, always execute a hot reload or hot restart…"), which the client keeps in the system prompt for the whole session.This PR gives the proxy a static
ServerInstructionsstring (McpStdioServer.AppToolsInstructions): when only the meta tools are listed, calluno_discover_toolsonce and run app tools throughuno_execute_tool; start the app withuno_app_start, neverdotnet run; after editing a.xaml/.csfile do not build, restart or start again, calluno_app_hot_reload_status(file)thenuno_app_find_elements; on a reportedRudeEdit(or to reload app data, or after a Release build) calluno_app_restartonce, oruno_app_closethenuno_app_starton an add-in without it (1.4); to change launch arguments or platform,uno_app_close(desktop) thenuno_app_start; locate byautomationId/name; close withuno_app_close. The add-in carries the same text for direct host clients (unoplatform/uno.app-mcp, branchdev/sb/server-instructions); the two are documented as kept in step, differing only in the discover/execute sentence and theuno_app_restartfallback the proxy needs because it serves any add-in version.Uno.UI.DevServer.Clibuilds in Release with 0 warnings. The text references tools shipped byUno.UI.App.Mcp1.4 (uno_app_hot_reload_status,uno_app_find_elements); an older add-in simply does not list them, and the discover/execute sentence still holds.PR Checklist ✅
McpServerOptions🤖 Generated with Claude Code
https://claude.ai/code/session_017KfqeYY7rsu5aiXBNtzsDQ
This is an automatic backport of pull request #25369 done by [Mergify](https://mergify.com).