@modudraft/mcp 0.11.0 → 0.12.1

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
@@ -62,6 +62,7 @@ Copy the key - you'll only see it once.
62
62
  |---|---|---|
63
63
  | `MODUDRAFT_API_KEY` | Yes | Your `mdft_…` API key |
64
64
  | `MODUDRAFT_API_URL` | No | Override API base URL (default: `https://api.modudraft.com`) |
65
+ | `MODUDRAFT_AUTO_TIDY_MS` | No | Quiet period, in milliseconds, before the architecture tab is auto-tidied after nodes or edges are added or removed (default `8000`; `0` turns auto-tidy off). See [Auto-tidy](#auto-tidy) |
65
66
 
66
67
  ---
67
68
 
@@ -75,7 +76,7 @@ Copy the key - you'll only see it once.
75
76
  | `get_diagram` | Get full diagram state + missing-metadata hints |
76
77
  | `delete_diagram` | Move diagram to Bin |
77
78
  | `clear_diagram` | Remove all content from a diagram |
78
- | `layout_diagram` | Auto-arrange nodes (dagre, supports LR/TB/RL/BT) |
79
+ | `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 |
79
80
  | `get_share_link` | Get or create a share link |
80
81
 
81
82
  ### Architecture nodes & edges
@@ -102,6 +103,9 @@ Copy the key - you'll only see it once.
102
103
  |---|---|
103
104
  | `add_sequence_message` | Add a message between two nodes (pass a node id or exact node label; resolved to the node id, which is what the Sequence tab draws) |
104
105
  | `bulk_add_sequence_messages` | Add many messages (and optional fragments) in one call; participants resolve to node ids like `add_sequence_message` |
106
+ | `get_sequence` | Read just the sequence: messages (ids, node labels, whether the tab draws them) and fragments; far smaller than `get_diagram` |
107
+ | `update_sequence_message` | Edit one message in place (sender, receiver, label, type) and/or move it to a new position |
108
+ | `delete_sequence_message` | Delete one message and renumber the rest; fragments that included it are trimmed (or removed if left empty) |
105
109
  | `add_sequence_participant` | Register a named participant |
106
110
  | `clear_sequence` | Remove all sequence messages |
107
111
  | `auto_sequence` | Derive sequence messages from the architecture edges |
@@ -120,11 +124,19 @@ Copy the key - you'll only see it once.
120
124
  ### API schema (OpenAPI)
121
125
  | Tool | Description |
122
126
  |---|---|
123
- | `add_api_endpoint` | Add a REST/GraphQL/gRPC endpoint |
124
- | `update_api_endpoint` | Update endpoint details |
127
+ | `add_api_endpoint` | Add a REST/GraphQL/gRPC endpoint (responses can carry an example `body` and `body_format`) |
128
+ | `update_api_endpoint` | Update endpoint details; `responses` replaces the whole response list, bodies included |
125
129
  | `delete_api_endpoint` | Remove an endpoint |
126
130
  | `export_openapi` | Export schema as OpenAPI 3.0 JSON |
127
131
 
132
+ ### Notes
133
+ | Tool | Description |
134
+ |---|---|
135
+ | `get_notes` | Return the diagram's Markdown notes |
136
+ | `set_notes` | Replace the notes |
137
+ | `append_to_notes` | Add content to the end of the notes |
138
+ | `replace_in_notes` | Literal find-and-replace inside the notes (must match exactly once unless `replace_all`), so one checkbox or sentence can change without resending everything |
139
+
128
140
  ### Cloud diagram
129
141
  | Tool | Description |
130
142
  |---|---|
@@ -250,3 +262,13 @@ The `get_diagram` response includes a `hints` array listing nodes with empty met
250
262
  ## License
251
263
 
252
264
  MIT © [Modudraft](https://modudraft.com)
265
+
266
+ ## Auto-tidy
267
+
268
+ Agents build a diagram with many small calls, and the layout only makes sense once the nodes *and* the edges between them exist. So adding or removing a node or an edge (`add_node`, `add_edge`, `delete_node`, `delete_edge`, `bulk_add_nodes`, `bulk_add_edges`) does not tidy immediately. Each change restarts a per-diagram timer, and the diagram is tidied **once, after the changes stop** - never between the ten adds of a ten-element build. It is the same layout as the editor's Tidy button.
269
+
270
+ - Editing a property (`update_node`, `update_edge`, metadata) never triggers it, only a change in the number of elements does.
271
+ - `add_node` with an explicit `x`/`y` keeps that position and does not schedule a tidy.
272
+ - Calling `layout_diagram` yourself tidies right away and cancels the pending one.
273
+ - The tidy is best-effort: if the diagram is locked by someone editing, it is skipped, and the next add or remove schedules another.
274
+ - Set `MODUDRAFT_AUTO_TIDY_MS` to change the quiet period, or `0` to turn it off.