Skip to main content
Glama

Build Mermaid diagram

build
Read-onlyIdempotent

Author a new Mermaid diagram from blank by folding a list of structured ops over an empty diagram of family. The declarative counterpart to hand-writing source. Returns the same envelope as mutate: { ok, family, source, verify } or { ok:false, family, opIndex, error }. Call describe_sdk for the family before authoring unfamiliar ops.

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": {
      "family": "<family>",
      "ops": "<ops>"
    },
    "name": "build"
  }
}

Input Schema

NameRequiredDescriptionDefault
opsYesNon-empty ordered list of ops; each is { kind, ...fields }.
familyYesDiagram family to author (one of: zenuml, eventmodeling, flowchart, state, sequence, timeline, class, er, journey, architecture, xychart, pie, quadrant, gantt, mindmap, gitgraph, radar, sankey, c4, packet, kanban, requirement, treemap, ishikawa, block).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / family / description
      Previous value: -"Diagram family to author (one of: flowchart, state, sequence, timeline, class, er, journey, architecture, xychart, pie, quadrant, gantt, mindmap, gitgraph, radar)."New value: +"Diagram family to author (one of: zenuml, eventmodeling, flowchart, state, sequence, timeline, class, er, journey, architecture, xychart, pie, quadrant, gantt, mindmap, gitgraph, radar, sankey, c4, packet, kanban, requirement, treemap, ishikawa, block)."
  2. Changed3 schema fields changed
    • changedInput schema / properties / family / description
      Previous value: -"Diagram family to author (one of: flowchart, state, sequence, timeline, class, er, journey, architecture, xychart, pie, quadrant, gantt, mindmap, gitgraph)."New value: +"Diagram family to author (one of: flowchart, state, sequence, timeline, class, er, journey, architecture, xychart, pie, quadrant, gantt, mindmap, gitgraph, radar)."
    • changedInput schema / properties / ops / description
      Previous value: -"Ordered list of ops; each is { kind, ...fields }."New value: +"Non-empty ordered list of ops; each is { kind, ...fields }."
    • addedInput schema / properties / ops / minItems
      Added value: +1
  3. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  4. Changed1 schema field changed
    • changedInput schema / properties / family / description
      Previous value: -"Diagram family to author (one of: flowchart, state, sequence, timeline, class, er, journey, architecture, xychart, pie, quadrant, gantt)."New value: +"Diagram family to author (one of: flowchart, state, sequence, timeline, class, er, journey, architecture, xychart, pie, quadrant, gantt, mindmap, gitgraph)."
  5. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed world), and the description adds substantive behavior beyond them: the exact success envelope { ok, family, source, verify } and the failure shape { ok:false, family, opIndex, error }, which is important since no output schema exists. It does not say whether ops apply atomically or what `verify` contains, keeping it out of 5 territory.

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?

Purpose comes first, then return contract, then the prerequisite. Every sentence carries information; 'The declarative counterpart to hand-writing source' is short positioning rather than filler. Slightly dense, but no waste.

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

Completeness4/5

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

For a tool that folds arbitrary ops with no output schema, the description supplies the return contract and a pointer to the op reference — the two things an agent most needs. Remaining gaps (atomicity on failure, contents of `verify`) are minor but real.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description earns above that by clarifying that `ops` is an ordered list folded over an empty diagram and by routing the agent to `describe_sdk` for individual op shapes — critical because the `ops` items schema is an unconstrained object.

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

Purpose4/5

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

Specific verb and resource: 'Author a new Mermaid diagram from blank by folding a list of structured ops over an empty diagram of `family`.' It positions itself against `mutate` (shares its envelope) and `describe_sdk` (op reference), and 'from blank' hints at the distinction from editing an existing diagram. The contrast with `mutate` is implied rather than stated, so it stops short of a 5.

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?

'From blank' frames it as the creation path, and 'Call `describe_sdk` for the family before authoring unfamiliar ops' gives a concrete prerequisite step. It never explicitly says when to prefer `mutate` over `build`, leaving the closest sibling boundary to inference.

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.