Skip to main content
Glama

create_diagram

Create a diagram in a shared Space and get an app URL for members; generate a public read-only link via the Share button for external viewers.

Instructions

Create a new diagram in the Space. Returns its id and its URL in the app, which only members of this Space can open — it is NOT a shareable link. To show the diagram to anyone outside the Space, someone in the Space opens it in DiagramZu and uses its Share button, which mints a public read-only link. See this server's instructions for diagram-type selection and class role names (edge/core/data/accent/muted) for color-grouping.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoMermaid source. Defaults to a tiny flowchart.
styleNoVisual preset: midnight (default dark), paper, forest, ocean, mono. Omit to use the default.
titleNoDisplay name
folderIdNoOptional UUID of an existing folder to place the diagram in. Use list_folders first to find the right folder by name (e.g. 'Infra', 'Schemas'). Omit to place at the space root.
descriptionNoOverall purpose of the diagram (≤1000 chars). Shown to share-link viewers and surfaced back to the agent as the diagram's brief — write this before generating the code.
styleOptionsNoOptional layout knobs, independent of the color preset. Each key is optional; omit any to keep its default. Pass layout: 'auto' to let the server pick a concrete layout based on the diagram's shape.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.3

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the disclosure burden and does it well: it explicitly warns that the returned URL is not a shareable link, explains the correct sharing workflow, and points to server instructions for diagram types and class role names. It does not exhaustively cover permissions or rate limits, but the most important behavioral caveat is clearly stated.

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

Conciseness5/5

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

Three sentences, each earning its place: purpose and return value, the sharing caveat, and the pointer to selection instructions. There is no filler or repetition of schema details.

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?

Given 6 parameters, a nested styleOptions object, and no output schema, the description supplies the critical return value, URL permission model, and sharing workflow. The schema covers parameter-level details, so nothing essential appears missing, though it could optionally mention auth requirements or default behavior more explicitly.

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 100%, with each parameter already described including defaults and enum options, so the baseline of 3 applies. The description adds only a general pointer to diagram-type selection and class roles rather than clarifying individual parameters, which is acceptable but not additive beyond the 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 ('Create a new diagram in the Space') and clarifies the return value (id and app URL). This cleanly distinguishes it from siblings like create_deck, update_diagram, and list_diagrams.

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?

Provides clear context for when to use the tool (creating a diagram) and useful caveats about the returned URL being Space-member-only. It does not explicitly name alternative tools or state when not to use it, but the purpose is unambiguous enough that this is a minor gap.

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