fix(mcp): stop empty UI-tool errors and tighten tool-usage guardrails#7911
Open
andypalmi wants to merge 2 commits into
Open
fix(mcp): stop empty UI-tool errors and tighten tool-usage guardrails#7911andypalmi wants to merge 2 commits into
andypalmi wants to merge 2 commits into
Conversation
added 2 commits
July 23, 2026 01:42
router.resolve throws an Error with no message (only extra own
properties) for an unknown route name in a production build, which the
dispatcher's catch collapsed to `err.message` and lost entirely. The
dispatcher now falls back to the error's own properties when message is
empty. ui_navigate also now catches resolve/push directly and returns a
clean, structured failure instead of letting an unnamed-route lookup
throw past it, and ui_list_routes stops hiding named redirect-only
routes (like an application's landing route) from route discovery.
Closes FlowFuse/engineering#188
…isions
ui_navigate's id param now warns explicitly that it must be a real
entity id from a list/get tool, never a display name, and clarifies
that success: true only confirms the route matched - not that the
target entity exists.
platform_create_application now says to check platform_list_applications
for a name collision before creating one. platform_create_remote_instance
now says to assign the device to an application right away when the user
references one, instead of leaving it unassigned by default.
platform_create_hosted_instance makes the name-availability check
mandatory and says to offer the user alternative names on a collision
rather than picking one silently.
Closes FlowFuse/engineering#185, FlowFuse/engineering#182, FlowFuse/engineering#183
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## fix/expert-mcp-latest-stack-and-spec #7911 +/- ##
========================================================================
- Coverage 75.65% 75.64% -0.01%
========================================================================
Files 432 432
Lines 23087 23084 -3
Branches 6126 6124 -2
========================================================================
- Hits 17466 17462 -4
- Misses 5621 5622 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Stacked on #7908.
Summary
ui_navigate(and any other UI automation tool) could returnTool "X" failed:with nothing after the colon, because vue-router throws anErrorwith nomessagein production for an unknown route name, and the dispatcher's catch collapsed straight toerr.message. The dispatcher now falls back to the error's own properties so the reason is never lost.ui_navigatealso now catchesresolve/pushdirectly and returns a clean, structured failure.ui_list_routesno longer hides named redirect-only routes (like an application's landing route) from discovery.platform_create_application/platform_create_remote_instance/platform_create_hosted_instanceare explicit about checking for name collisions before creating and asking the user instead of guessing.Closes
Test plan
npx vitest run --config ./config/vitest.config.ts test/unit/frontend/mcp/tools/navigation.spec.js test/unit/frontend/mcp/tools/routes.spec.js test/unit/frontend/services/automations.service.spec.js- all passingnpx eslinton all touched files - clean