Skip to main content
Glama

Revise a diagram

revise_diagram
Read-onlyIdempotent

Change 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

NameRequiredDescriptionDefault
changesYesEdits 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"}}.
diagramYesThe diagram to change: the `document` compose_diagram returned

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations: it discloses that changes are applied in order, that the response mirrors compose_diagram (image URL, builder link, checks, advice, look, revised document), that MCP Apps hosts re-render the widget, and that a non-fitting change is reported with the diagram's actual contents. It does not discuss cascade effects (removing a group also removes its tools, connectors and notes), which only the schema states. The readOnly/idempotent hints are consistent with the description's framing of a stateless pass-document-in/get-document-back operation, so no contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action and the sibling reference, then the operation list, then the return/error behavior — a sensible order with no filler sentences. The return-value sentence is long and partly redundant given an output schema exists, which is the main thing keeping it from a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter tool with a fully annotated, fully described schema and an output schema, the description covers everything an agent needs: the source of `document`, the change vocabulary, ordering, return shape, host rendering, and failure reporting. Nothing required for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the `changes` property already carries an extensive example list, so the schema does most of the work. The description adds one genuinely useful constraint the schema does not spell out — pass the `document` exactly "as returned" by compose_diagram — and otherwise restates the change vocabulary at a summary level. That is close to the baseline for a fully documented schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Change a diagram") and immediately ties it to the artifact produced by the sibling compose_diagram ("made with compose_diagram ... pass its `document`"). It enumerates the operation space (add/remove/replace/move a tool, connect/disconnect, notes, groups, title/look), so an agent can distinguish it from compose_diagram without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Change a diagram made with compose_diagram without writing it out again" is a clear routing rule: revise an existing document instead of re-emitting a full spec. It supplies a worked edge case ({"disconnect": "all"} makes it a plain stack again) and ordering semantics. It stops short of an explicit exclusion (e.g. "use compose_diagram when no document yet exists"), so it is strong context rather than a full when/when-not statement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.