Skip to main content
Glama

Save a diagram

diagram_create

Saves a new diagram from a DSP scene or Mermaid text; returns its id, revision 1 and hashes. key is your stable name for it, unique in the workspace: your repeat with the same key and content returns the existing diagram, not a copy. brief stores context for the next agent. Versions are kept until you delete the diagram or its workspace is deleted.

Input Schema

NameRequiredDescriptionDefault
keyNoe.g. payments-architecture
briefNoWhat the diagram shows, conventions to keep, decisions made
sceneNohttps://zindex.ai/schemas/scene.schema.json
mermaidNoerDiagram or flowchart (graph); drops subgraphs, edges to them and styles
messageNoOne line on why it was made

Output Schema

NameRequiredDescriptionDefault
idYes
keyNo
hashYes
chainYes
createdNo
revisionYes
warningsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedOutput schema / properties / changed
      Removed value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "added": {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "more": {
      -      "maximum": 9007199254740991,
      -      "minimum": 1,
      -      "type": "integer"
      -    },
      -    "removed": {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "updated": {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    }
      -  },
      -  "required": [
      -    "added",
      -    "updated",
      -    "removed"
      -  ],
      -  "type": "object"
      -}
    • removedOutput schema / properties / noop
      Removed value: -{
      -  "type": "boolean"
      -}
    • removedOutput schema / properties / replayed
      Removed value: -{
      -  "type": "boolean"
      -}
  2. First observed

TDQS

A4.2/5.0
Behavior3/5

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

The description details key behaviors, such as returning IDs/hashes and retaining versions until deletion. However, it presents a significant behavioral conflict with the annotations; it describes content-based idempotency while the annotations set `idempotentHint: false`.

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?

The description is well-structured, dedicating one sentence to output, one to the key constraint/idempotency, and one to the lifecycle. It is dense but logically paced.

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?

Given the complexity of diagram management, the description is highly complete. It covers input formats, output identifiers, content constraints (idempotency), and version lifecycle management.

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?

With 100% schema coverage, the description is not forced to explain data types, but it adds value by defining the *role* of inputs: `key` is defined as the stable, unique identifier, and `brief` is noted as storing context for future agents.

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?

The description clearly states the primary function: saving a new diagram from either a DSP scene or Mermaid text. This is distinct from sibling tools like diagram_edit or diagram_get, making the purpose unambiguous.

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?

It implies the usage of creation and provides crucial context about how it behaves when the same inputs are repeated. While it doesn't explicitly list exclusions, the function name and context make its role clear.

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.

Resources