Revise a diagram
revise_diagramChange a diagram made with compose_diagram without writing it out again: pass its document (as returned) and a list of changes: add, remove, replace or move a tool, connect or disconnect two, add a note, add or remove a group, or set the title, the look or a group's title and colour ({"disconnect": "all"} makes it a plain stack again). Changes apply in order. Returns the same as compose_diagram (image URL, builder link, checks, advice, look, the revised document) and, in hosts that render MCP Apps, shows the revised picture in the same widget. A change that doesn't fit says which one and what the diagram has instead.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"diagram": "<diagram>",
"changes": "<changes>"
},
"name": "revise_diagram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| changes | Yes | Edits applied in order. Tools are named by slug (catalogue tools) or id (custom tools); groups by id. Examples: {"add": "redis", "to": "data"}; {"add": {"id": "worker", "name": "Worker", "icon": "server"}, "to": "app"}; {"remove": "mongodb"}; {"replace": "vercel", "with": "netlify"}; {"move": "stripe", "to": "services"}; {"set": {"title": "Acme tech stack", "display": {"preset": "standard"}}}; {"group": "data", "set": {"title": "Storage", "color": "emerald"}}; {"add_group": {"id": "ai", "title": "AI", "tools": ["openai"]}, "after": "app"}; {"remove_group": "ops"}; {"connect": {"from": "nextjs", "to": "postgresql", "label": "reads"}}; {"disconnect": {"from": "nextjs", "to": "postgresql"}}; {"disconnect": "all"}; {"note": {"near": "data", "text": "Managed Postgres after launch"}}. | |
| diagram | Yes | The diagram to change: the `document` compose_diagram returned |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||