@modudraft/mcp 0.20.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -74,7 +74,7 @@ Without it, all diagram tools work as usual. The file tools fall back to your cl
74
74
 
75
75
  ## Toolsets
76
76
 
77
- Every MCP tool is listed by default. If that is too much context for your client, set `MODUDRAFT_TOOLSETS` to list fewer: `core` lists a much smaller set, and the core group covers diagram management, nodes and edges, rendering, discovery, org context and `search_diagrams`. The core tools are: `list_diagrams`, `create_diagram`, `get_diagram`, `rename_diagram`, `delete_diagram`, `clear_diagram`, `layout_diagram`, `get_share_link`, `add_node`, `get_node`, `update_node`, `delete_node`, `add_edge`, `update_edge`, `delete_edge`, `add_boundary`, `add_note`, `render_diagram_text`, `list_archetypes`, `list_tools`, `list_protocols`, `get_node_schema`, `get_org_context`, `refresh_org_context`, `search_diagrams`.
77
+ Every MCP tool is listed by default. If that is too much context for your client, set `MODUDRAFT_TOOLSETS` to list fewer: `core` lists a much smaller set, and the core group covers diagram management, nodes and edges, rendering, discovery, org context and `search_diagrams`. The core tools are: `list_diagrams`, `create_diagram`, `get_diagram`, `rename_diagram`, `delete_diagram`, `clear_diagram`, `layout_diagram`, `get_share_link`, `add_node`, `get_node`, `update_node`, `delete_node`, `add_edge`, `update_edge`, `delete_edge`, `add_boundary`, `add_note`, `move_to_level`, `render_diagram_text`, `list_archetypes`, `list_tools`, `list_protocols`, `get_node_schema`, `get_org_context`, `refresh_org_context`, `search_diagrams`.
78
78
 
79
79
  | Toolset | Purpose | Tools |
80
80
  |---|---|---|
@@ -96,6 +96,15 @@ Every MCP tool is listed by default. If that is too much context for your client
96
96
  - `load_toolset(name)` adds a group at runtime and sends a tools-changed notification. If your client doesn't refresh tools after `load_toolset`, set `MODUDRAFT_TOOLSETS` instead.
97
97
  - Calling any tool by name always works, even when it isn't listed: the server loads its group and runs it.
98
98
 
99
+ ### Upgrading to 0.21.0
100
+
101
+ - Architecture diagrams have levels: a component can contain other items. New optional inputs: `inside` (a component id or label; empty or `null` means the top level) on `add_node`, `bulk_add_nodes`, `add_boundary`, `add_note` and `update_node`; `c4_kind` and `description` on `update_node`; `inside: "delete" | "lift"` on `delete_node`; `level` on `render_diagram_text`, `layout_diagram`, `export_mermaid`, `export_plantuml`, `export_drawio` and `export_to_file`.
102
+ - New tool `move_to_level` (core) moves components into another component or back to the top level.
103
+ - `delete_node` now asks before deleting a component that has items inside: pass `inside: "delete"` to delete them too or `inside: "lift"` to move them up one level.
104
+ - `get_diagram` returns a `levels` field (for example `Top: 2 items; Orders: 1`). `render_diagram_text` and the exports show the top level unless you pass `level`; items outside the level appear marked as outside, with arrows to them shown as implied.
105
+ - `validate_diagram` reports broken levels as errors and C4 rule breaks as warnings.
106
+ - Diagrams without levels behave as before. Deploy the web app and API first: a level written by this version needs a web app that reads file format 2.11.0.
107
+
99
108
  ### Upgrading to 0.20.0
100
109
 
101
110
  - Adds the `sync_project` tool and the `modudraft-mcp check` command. Nothing is removed. See [Repo sync and CI drift check](#repo-sync-and-ci-drift-check).
@@ -150,7 +159,7 @@ Besides tools, the server offers MCP resources and prompts, for clients that sup
150
159
  |---|---|
151
160
  | `list_diagrams` | List your diagrams from every workspace you belong to |
152
161
  | `create_diagram` | Create a new diagram (optional `workspace_id`) |
153
- | `get_diagram` | Get full diagram state + missing-metadata hints. Large diagrams are paged: pass `tab_id`, `offset` and `limit` to read one tab in slices |
162
+ | `get_diagram` | Get full diagram state + missing-metadata hints, plus a `levels` summary (items per level). Large diagrams are paged: pass `tab_id`, `offset` and `limit` to read one tab in slices |
154
163
  | `delete_diagram` | Move diagram to Bin |
155
164
  | `clear_diagram` | Remove all content from a diagram |
156
165
  | `layout_diagram` | Auto-arrange the architecture tab now, with the same layout as the editor's Tidy button (LR/TB/RL/BT); boundaries are refitted around their nodes. Pinned nodes keep their place; pass `include_pinned: true` to lay out everything and clear all pins |
@@ -169,6 +178,7 @@ Besides tools, the server offers MCP resources and prompts, for clients that sup
169
178
  | `delete_edge` | Remove a connection |
170
179
  | `add_boundary` | Add a grouping boundary box |
171
180
  | `add_note` | Add a sticky note annotation |
181
+ | `move_to_level` | Move items (`items`: ids, or labels for components) into another component (`inside`: id or label) or back to the top level (`inside: null`); refused when it would put a component inside itself |
172
182
 
173
183
  ### Node metadata
174
184
  *(toolset: `modeling`, except `get_node_schema`, which is in `core`)*
@@ -283,20 +293,20 @@ The old `request_body`, `request_format`, `body`, `body_format` and top-level `r
283
293
 
284
294
  | Tool | Description |
285
295
  |---|---|
286
- | `export_mermaid` | Export as Mermaid flowchart or ER diagram (paste into GitHub Markdown) |
287
- | `render_diagram_text` | Draw the architecture, sequence, DB schema (ER), cloud, network or data-flow tab as plain-text line art, the whole tab or a part of it (see [Viewing diagrams as text](#viewing-diagrams-as-text)) |
288
- | `export_plantuml` | Export as PlantUML component diagram |
289
- | `export_drawio` | Export as draw.io / diagrams.net XML |
296
+ | `export_mermaid` | Export as Mermaid flowchart or ER diagram (paste into GitHub Markdown). `level` exports one level of the architecture |
297
+ | `render_diagram_text` | Draw the architecture (`level` shows one level; outside items are marked "(outside)"), sequence, DB schema (ER), cloud, network or data-flow tab as plain-text line art, the whole tab or a part of it (see [Viewing diagrams as text](#viewing-diagrams-as-text)) |
298
+ | `export_plantuml` | Export as PlantUML component diagram. `level` exports one level |
299
+ | `export_drawio` | Export as draw.io / diagrams.net XML. `level` exports one level |
290
300
  | `export_terraform` | Generate Terraform resource stubs from the cloud tab |
291
301
  | `export_k8s_yaml` | Generate Kubernetes YAML manifests from the cloud tab |
292
- | `export_to_file` | Write any export format directly to a local file |
302
+ | `export_to_file` | Write any export format directly to a local file (`level` picks the architecture level for mermaid, plantuml and drawio) |
293
303
 
294
304
  ### Validation & diff
295
305
  *(toolset: `analysis`)*
296
306
 
297
307
  | Tool | Description |
298
308
  |---|---|
299
- | `validate_diagram` | Check a diagram for issues: dangling edges, orphaned nodes, FK integrity, missing PKs, duplicate routes, etc. |
309
+ | `validate_diagram` | Check a diagram for issues: dangling edges, orphaned nodes, FK integrity, missing PKs, duplicate routes, broken levels (errors) and C4 rule breaks (warnings), etc. |
300
310
  | `diff_diagram` | Compare two diagrams and return a structured list of what changed (added/removed/modified) |
301
311
 
302
312
  ### Cross-diagram intelligence