Skip to main content
Glama

Save diagram

diagram_save

Render and save a Mermaid diagram as .mmd/.svg/.png under docs.dir, update the README index, and optionally publish a digest to lv24-brain.

Instructions

Render and store a diagram as NN-slug.mmd/.svg/.png under docs.dir, update the README index, and optionally publish a digest to lv24-brain.

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": {
      "title": "<title>",
      "mermaid": "<mermaid>"
    },
    "name": "diagram_save"
  }
}

Input Schema

NameRequiredDescriptionDefault
pngNo
themeNo
titleYes
mermaidYes
backgroundNo
publish_to_brainNoBest-effort brain note (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the important mutation surface: files written under docs.dir, README index rewritten, and an optional external publish to lv24-brain. It still omits overwrite/conflict behavior when a diagram of the same title exists, permission or auth needs for the brain publish, and whether any of these writes are reversible.

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?

A single dense sentence with the primary action front-loaded and side effects following in sequence. Nothing is padding, though the packed clauses make it slightly harder to scan than a short bulleted breakdown would be.

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

Completeness3/5

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

For a 6-parameter write tool with no annotations and no output schema, the description covers artifacts and side effects but not return values, overwrite semantics, or the theme/background options. It is adequate to attempt a call, but an agent would still be guessing on several inputs and on the response.

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 coverage is only 17% across 6 parameters, so the description must compensate and partially does: it explains the mermaid source implicitly through 'render', the png flag through the .png artifact, and publish_to_brain through the digest-to-lv24-brain clause. It says nothing about theme, background, or how title maps to the NN-slug filename, leaving half the parameters undocumented in both places.

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?

States a specific compound action (render and store a diagram) plus concrete outputs and naming convention (NN-slug.mmd/.svg/.png under docs.dir). It also discloses secondary effects (README index update, optional brain publish), which lets an agent distinguish it from a pure renderer like diagram_render, though no sibling is named explicitly.

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

Usage Guidelines2/5

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

No explicit when-to-use or when-not guidance. The word 'optionally' on brain publishing hints at a choice, but nothing tells the agent when to pick diagram_save over diagram_render or drawio_export, nor what preconditions (existing docs.dir, initialized README) must hold.

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