One AI tool catalogue for Studio, Radical Forge and the MCP server - #112
Merged
Merged
Conversation
…CP server Every AI tool now lives in @radical/common/ai/tools, and a facade decides where an edit lands: Studio's store, or the headless model that the MCP server writes to a Markdown folder. New tools: move_node, update_view and dynamic views, create/update/ delete_sequence, create/update/delete_presentation, upsert/delete node and relation types, and an async smart_layout (All elements or one view). search_model gains LIST SEQUENCES and GET SEQUENCE. Radical Forge leaves out the metamodel and presentation groups (excludeToolGroups); the runner rebuilds tool schemas when the metamodel changes mid-run. MCP server: get_model_summary returns the metamodel context message that the tool descriptions refer to, plus views, sequences and presentations. New and moved nodes are placed inside their parent, parents are refitted, defaultPositions stay in step with node geometry, and tool schemas are re-advertised after a metamodel change. Shared code: reparent rules (checkReparent/reparentNodes) and the metamodel message move to @radical/common; the view layout input, parent fitting and placement move to @radical/layout. Studio's store uses them. Fix: editing a built-in metamodel (Metamodel Editor or tools) now works on a "-custom" copy. documentMetamodel swaps a preset id back to the preset on load, which silently dropped those edits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MateuszWk
approved these changes
Oct 5, 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.
Summary
All AI tools now live in
@radical/common/ai/tools. Studio's AI chat, Radical Forge and the MCP server all use this one catalogue. A facade decides where an edit lands: in Studio's store, or in the headless model that the MCP server writes to a Markdown folder. The MCP server has only one tool of its own:get_model_summary.New tools (available everywhere)
move_node: moves a node to a new parent or to the root. It keeps the node's canvas position and enforces the metamodel'sallowedParents.update_viewchanges the name, kind, linked sequence or hidden relations.create_viewnow also createsdynamicviews.create_sequence,update_sequence,delete_sequence.search_modeladdsLIST SEQUENCESandGET SEQUENCE <id>.create_presentation,update_presentation,delete_presentation. Each slide shows one view, and Studio frames it to fit.upsert_node_type,delete_node_type,upsert_relation_type,delete_relation_type.smart_layoutarranges All elements, or one static or dynamic view. It is the first async tool (runTool).excludeToolGroups). The QuickSearch chat gets every tool.MCP server
get_model_summarynow returns the metamodel context message that the tool descriptions refer to: property keys, enum options, allowed parents and relation pairs. It also lists views, sequences and presentations. The server'sinstructionstell clients to call it first.defaultPositionsin_layout.jsonnow stays in step with node geometry. Before this, Studio restored stale positions when you switched back to All elements.list_changed). A restart is no longer needed.Shared code
checkReparentandreparentNodes(in@radical/common/model) and the metamodel message builder (@radical/common/ai/metamodelContext) moved out of Studio, and Studio's store uses them.@radical/layout(viewInput.ts,geometry.ts).Fix
Edits to a built-in metamodel are no longer lost.
documentMetamodelreplaces a preset id (c4-builtin,c4-ddd-builtin,c4-ddd-governance-builtin) with the current preset on load, which silently dropped Metamodel Editor edits. The Metamodel Editor and the metamodel tools now edit a…-customcopy instead. Such a copy no longer picks up later changes to the preset.Behaviour to review
smart_layoutfirst switches to the view it lays out (or to All elements), because Studio lays out what is on screen.Tests
npm testpasses in common (108), layout (48), ui (168), Studio (162) and mcp (6). Typechecks andcheck:workspacesare clean.modelFacadeParity.test.tsruns the same tool calls against Studio's store and the headless facade. It now also covers moving nodes, views, sequences and the metamodel. It caught one difference, in how sequence step descriptions were stored, which is fixed.smart_layoutfor All elements and for one view, presentations, and the metamodel copy with its schema refresh.runLayout, because Studio's unit tests don't run ELK.Open items are logged in
docs/IMPROVEMENTS.mdunder "AI tool catalogue and MCP server (2026-10-05)".🤖 Generated with Claude Code