Skip to main content
Glama

Export a figure to another format

export
Idempotent

Convert a rendered diagram into PNG, PDF, SVG, draw.io, or Excalidraw by reading its OUT.graph.json receipt, then write the new file beside it or to a chosen path and return its path.

Instructions

Redraw a rendered figure as png, pdf, svg, drawio or excalidraw. It reads the receipt (OUT.graph.json) that render wrote beside the figure, so the figure must have been drawn by this tool. Writes the new file next to it, or at out, and returns the path as a line of text. png and pdf need cairosvg or headless Edge or Chrome. Overwrites an existing file at the same path.

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": {
      "path": "<path>"
    },
    "name": "export"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoOutput format. Default png.
outNoWhere to write the file. Default: beside the figure.
pathYesThe figure's base path, or its .html or .svg. OUT.graph.json must sit beside it.
layoutNoPage preset for png and pdf: figure (760 px wide, default), wide (1120), slide (1280) or social (1080).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.9.1
    • addedInput schema / properties / layout / description
      Added value: +"Page preset for png and pdf: figure (760 px wide, default), wide (1120), slide (1280) or social (1080)."
    • addedInput schema / properties / layout / enum
      Added value: +[
      +  "figure",
      +  "wide",
      +  "slide",
      +  "social"
      +]
    • addedInput schema / properties / out / description
      Added value: +"Where to write the file. Default: beside the figure."
    • addedInput schema / properties / path / description
      Added value: +"The figure's base path, or its .html or .svg. OUT.graph.json must sit beside it."
    • addedInput schema / properties / to / description
      Added value: +"Output format. Default png."
    • changedInput schema / properties / to / enum
      Previous value: -[
      -  "png",
      -  "pdf",
      -  "svg"
      -]New value: +[
      +  "png",
      +  "pdf",
      +  "svg",
      +  "drawio",
      +  "excalidraw"
      +]
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: it reads a receipt file, writes output beside the source or at out, returns the path as text, requires cairosvg or headless Edge/Chrome for png and pdf, and explicitly warns that it overwrites an existing file at the same path. These details are exactly what an agent needs before invoking a write operation.

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 compact sentences, front-loaded with the action and formats, followed by preconditions, output behavior, and dependencies. No sentence is redundant or wasted.

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?

Complete for a four-parameter write tool with no output schema. Return format is described, overwrite behavior is disclosed, receipt preconditions are stated, and format-specific dependencies are called out.

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 useful meaning about format dependencies and output behavior. The layout parameter is left to the schema, which is acceptable given its full enum documentation.

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: redraw a rendered figure into png, pdf, svg, drawio, or excalidraw. It also distinguishes itself from the sibling render tool by noting that it consumes the receipt render wrote.

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?

Gives a clear precondition: the figure must have been drawn by this tool, and OUT.graph.json must exist beside it. It does not explicitly name the render sibling as the alternative or state when to choose another format, but the usage context is clear.

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

Deploy Server

Other Tools