Skip to main content
Glama

Plot data

plot
DestructiveIdempotent

Draw charts from inline data and get back a PNG image plus a text summary. Build line, bar, scatter, 3D or molecule panels in a grid and optionally save as PNG, SVG, PDF or HTML.

Instructions

Draw one or more charts from data passed inline in the call and return them as a PNG image plus a short text description of what was drawn.

When to use: you already have the numbers (from the conversation, a computation or another tool). To chart a CSV/TSV/JSON file on disk use plot_file instead; for a 3D protein or DNA structure on its own, molecule is simpler (a molecule panel here is only needed to combine it with other charts).

How: panels is a list of charts laid out in a grid. Each panel has a type (line, scatter, bar, hist, box, violin, heatmap, pie, sankey, candlestick, roc, surface, scatter3d, … 44 in all) plus that type's data fields, for example {"type": "line", "x": [1, 2, 3], "y": [2, 4, 3]}. Call chart_types first if unsure of a type's fields. Options every panel takes: title, x_label, y_label, z_label, x_limits [min, max], y_limits, x_log, y_log, legend, camera [azimuth, elevation] and rotate {x, y, z} in degrees (3D), drawings [{type: trend|ray|fib, from [x, y], to [x, y]} or {type: level, y}].

Behavior: draws in memory and writes nothing unless output is given. Molecule panels with a pdb_id download the structure from files.rcsb.org; nothing else uses the network. Width and height are clamped to 100-6000 px. An invalid spec (unknown type, missing or mismatched data fields) returns an error result whose text names the problem, and nothing is drawn or saved.

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": {
      "panels": "<panels>"
    },
    "name": "plot"
  }
}

Input Schema

NameRequiredDescriptionDefault
colsNoColumns of the panel grid (default: chosen from the number of panels).
rowsNoRows of the panel grid (default: chosen from the number of panels).
imageNoReturn the image (default true; false returns only the text summary).
themeNoColor theme (default light). high_contrast uses dark colors with at least 4.5:1 contrast and larger text.
titleNoFigure title.
widthNoWidth in pixels (default 900).
heightNoHeight in pixels (default 600).
outputNoAlso save the chart to this file path; the format follows the extension (.png, .svg, .pdf, or .html for an interactive page). An existing file at that path is overwritten. Omit to write nothing.
panelsYesCharts, one per panel, laid out in a grid (rows/cols automatic unless given). Each item needs `type` (or `mark` for the grammar of graphics) and that type's data fields.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.1.1
    • addedInput schema / properties / cols / description
      Added value: +"Columns of the panel grid (default: chosen from the number of panels)."
    • changedInput schema / properties / output / description
      Previous value: -"Also save the chart to this path (.png, .svg, .pdf or .html, interactive)."New value: +"Also save the chart to this file path; the format follows the extension (.png, .svg, .pdf, or .html for an interactive page). An existing file at that path is overwritten. Omit to write nothing."
    • changedInput schema / properties / panels / description
      Previous value: -"Charts, laid out in a grid (rows/cols automatic unless given)."New value: +"Charts, one per panel, laid out in a grid (rows/cols automatic unless given). Each item needs `type` (or `mark` for the grammar of graphics) and that type's data fields."
    • addedInput schema / properties / rows / description
      Added value: +"Rows of the panel grid (default: chosen from the number of panels)."
    • addedInput schema / properties / theme / description
      Added value: +"Color theme (default light). high_contrast uses dark colors with at least 4.5:1 contrast and larger text."
  2. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint, openWorldHint, and idempotency, and the description adds real nuance on top rather than repeating them: writes nothing unless output is given, only molecule panels touch the network (files.rcsb.org), width/height are clamped to 100-6000 px, and an invalid spec returns an error naming the problem with nothing drawn or saved. That narrows openWorldHint and explains the file-overwrite path that justifies destructiveHint.

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?

Front-loaded with the outcome and a labelled 'When to use' and 'How' structure, and almost every sentence carries operative information. The per-panel option enumeration is dense but earns its place for a 44-type tool; only a little tightening would improve it.

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?

For a 9-parameter tool with no output schema, the description covers what is returned (image plus text summary), what is written and when, network behavior, size limits, and failure semantics. Nothing an agent needs in order to call it correctly is missing.

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 still adds meaning beyond the schema: it shows the required shape of a panel entry with a worked example, lists the universal per-panel options (title, limits, log flags, camera, rotate, drawings), and points at chart_types for per-type field lookup that the schema cannot express via additionalProperties.

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?

Opens with a specific verb and resource ('Draw one or more charts from data passed inline') and states the return ('PNG image plus a short text description'). It also explicitly distinguishes itself from plot_file (file on disk) and molecule (standalone structure), so an agent can pick it without opening sibling schemas.

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

Usage Guidelines5/5

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

Gives an explicit when-to-use condition ('you already have the numbers') and names two alternatives with the exact situations that select them: plot_file for CSV/TSV/JSON on disk, molecule when a structure stands alone but not when combining it with other charts. This is a complete routing rule, not an implication.

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