Skip to main content
Glama

Export the diagram

export_diagram

Exports the open BPMN diagram as a BPMN, SVG, PNG, or PDF file, saving it to the server's exports folder or offering a user download when a file is requested.

Instructions

Exports the open diagram as a file, exactly like the editor's Export menu: bpmn (BPMN 2.0 XML), svg, png (2x, white background) or pdf (vector). When the editor runs with its server, the file is saved in the exports folder of the server; an existing file is never replaced ("Name (2).pdf" is added next to it). The editor also shows the user a Download button: nothing is downloaded unless they click it. The file content is not returned. Use it only when the user asks for a file.

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": {
      "format": "<format>"
    },
    "name": "export_diagram"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoFile name without extension. Default: the name of the diagram in the editor
formatYesFile format

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full load and does so well: it discloses where the artifact lands (server exports folder), that existing files are never replaced ("Name (2).pdf"), that nothing is downloaded unless the user clicks the Download button, and that content is not returned. These are exactly the side effects and failure modes an agent needs to avoid misreporting success.

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?

Four sentences, no filler, front-loaded with what it produces and followed by storage, download, and usage caveats in descending importance. Each sentence contributes a distinct fact rather than restating the name or schema.

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?

There is no output schema, and the description compensates by stating outright that file content is not returned and where the file is written. Format options, naming/collision behavior, and the user-action requirement are all covered, leaving no ambiguity about what a successful call produces.

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, but the description adds real meaning beyond the enum: bpmn is BPMN 2.0 XML, png is rendered at 2x on a white background, and pdf is vector. The name parameter is not elaborated in prose, but the schema already documents the no-extension default and max length.

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?

"Exports the open diagram as a file" is a specific verb+resource, and the enumerated formats (bpmn, svg, png, pdf) pin down the scope precisely. It distinguishes itself from content-returning siblings only implicitly, via "The file content is not returned" and "Use it only when the user asks for a file" — no sibling such as get_diagram_xml or get_diagram_image is named.

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?

"Use it only when the user asks for a file" is an explicit gating condition, and "exactly like the editor's Export menu" frames the intent. The contrast with tools that return content is implied by "The file content is not returned," but the description never names the alternative tools or states when those should be preferred.

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