UI MCP tool definitions and automations service#7601
Open
cstns wants to merge 3 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 7430_mcp-platform-tools #7601 +/- ##
========================================================
Coverage 76.70% 76.70%
========================================================
Files 421 421
Lines 21270 21270
Branches 5160 5160
========================================================
Hits 16316 16316
Misses 4954 4954
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:
|
n-lark
reviewed
Jun 30, 2026
| { | ||
| name: 'ui.navigate', | ||
| description: 'Navigate the user\'s browser to a specific page. Takes a route name and optional params. Use ui.list-routes to discover valid route names and their required parameters.', | ||
| annotations: { readOnlyHint: true, destructiveHint: false }, |
Contributor
There was a problem hiding this comment.
Should this be readOnlyHint: false since it can navigate for the user??
n-lark
reviewed
Jun 30, 2026
| required: ['route'] | ||
| }, | ||
| async handler (args, { router }) { | ||
| const { route: routeName, params } = args as { route: string, params?: Record<string, string> } |
Contributor
There was a problem hiding this comment.
This as is sus - the type is unknown then we force it here. Should we be validating this shape?
n-lark
approved these changes
Jun 30, 2026
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.
Description
Implements the frontend-side UI tool definitions and dispatch service for the first-party agent. This covers the three tools described in #7561 (context, route discovery, navigation) but with an architectural change: tool definitions and execution live in the frontend, not on the agent.
The original issue assumes tools are implemented on the agent side and exposed over MQTT. We moved them to the frontend because the 3rd party agent serves multiple Forge instances (cloud and self-hosted) running different frontend versions, each with potentially different UI capabilities. Having the frontend declare its own tools means the agent doesn't need to hardcode version-specific knowledge. It discovers tools dynamically per session.
What's here:
The service is self-contained and ready to be called when the MQTT inflight bridge lands. $services.automations.getToolDefinitions() for discovery, $services.automations.dispatch(toolName, args) for execution.
Related Issue(s)
closes #7561
Checklist
flowforge.yml?FlowFuse/helmto update ConfigMap TemplateFlowFuse/CloudProjectto update values for Staging/ProductionLabels
area:migrationlabel