MCP: add tools.* namespace for plugin discovery + activation#5996
Merged
Conversation
Four read-only or activate-style tools backed by RibbonSchemaHolder. Lets an
LLM enumerate and operate plugins by id without walking the ribbon UI tree:
- tools.listAll — sorted ids of every registered ribbon item
- tools.listActive — ids of currently-open state plugins
- tools.getInfo(ids) — batch metadata: caption, tab, type, active, status,
tooltip, helpLink (missing ids land in `missing`)
- tools.action(id) — clicks/toggles by id; mirrors RibbonMenu's
skip-availability-check-when-active rule
No new public API on RibbonMenu/RibbonSchemaHolder — uses existing primitives.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Fedr
approved these changes
Apr 27, 2026
| <ClCompile Include="MRViewerMcp.cpp"> | ||
| <Filter>MCP</Filter> | ||
| </ClCompile> | ||
| <ClCompile Include="MRToolsMcp.cpp"> |
Contributor
There was a problem hiding this comment.
May be better name it "MRMcpTools.cpp" as below item?
Contributor
Author
There was a problem hiding this comment.
naming as others mcp namespaces ("scene" "ui" "tools" "viewer")
adalisk-emikhaylov
approved these changes
Apr 27, 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.
Follow-up to #5972 / #5980 / #5982 (MCP scene/viewer/ui namespaces). Adds a
tools.*namespace so LLMs can enumerate and operate ribbon plugins by id without walking the ribbon UI tree.Tools
tools.listAll— sorted array of every registered ribbon item id (~300). Tab-independent, unlikeui.listAllEntrieswhich only sees the active ribbon tab.tools.listActive— ids of currently-open state plugins (typically 0–2).tools.getInfo({ids})— batch metadata lookup. Per-id row:caption,tab,type(button/stateBlocking/stateNonBlocking),active,status(available/disabled: <reason>),tooltip,helpLink. Ids absent from the schema land in a parallelmissingarray instead of erroring the whole call.tools.action({id})— clicks / toggles by id. State plugins toggle; one-shot buttons run their action. MirrorsRibbonMenu::getRequirements_'s skip-availability-check-when-active rule.No new public API — built directly on
RibbonSchemaHolder::schema(),RibbonMenuItem::action() / isActive() / isAvailable() / getDynamicTooltip(), andRibbonSchemaHolder::findItemTab.Verification
Live via SSE against a local debug build:
tools.listAll→ 309 sorted ids; spot-checks forSave Scene,Decimate Mesh,About,Mesh-based Boolean,Camera,Crash Me.tools.getInfo(["Mesh-based Boolean", "Save Scene", "Show_Hide Global Basis", "Distance Map", "About", "Camera", "Crash Me"])→ all threetypevariants observed; statuses match selection requirements (disabled: Select exactly two Meshes, etc.); tooltips and helpLinks populated where the schema provides them.tools.action({id:"About"})→{active: true};tools.listActive→["About"]; second call →{active: false};tools.listActive→[].tools.action({id:"Binary Operations"})with no objects selected →tools.action Binary Operations: Select exactly two Voxel Volumes.tools.action({id:"NotAReal Plugin xyz"})→tool 'NotAReal Plugin xyz' not found.🤖 Generated with Claude Code