Skip to main content
Glama

Plot a data file

plot_file
DestructiveIdempotent

Read a CSV, TSV or JSON file from disk and chart its columns, returning a PNG image plus a text summary of the columns found and what was drawn. Handles large files without pasting data.

Instructions

Chart the columns of a CSV, TSV or JSON file on disk and return a PNG image plus a text summary (columns found, what was drawn).

When to use: the data is in a file the server can read, especially a large one you should not paste into a call. For data you already have in the conversation use plot, which also offers all 44 chart types; plot_file covers the common kinds below.

How: give path; JSON may be an array of objects or {column: [values]}. kind=auto (default) picks a line chart for a numeric x column, bars for a text x column and a histogram for a single numeric column; correlation draws the correlation matrix of all numeric columns. x, y and group choose columns by name.

Behavior: only reads the file; writes nothing unless output is given, and uses no network. A missing file, an unknown column or a file with no rows returns an error result whose text says which.

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": "plot_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNoColumn for x (categories for bar).
yNoColumn(s) for y: a name or a list of names (default: all numeric columns except x).
kindNoChart kind (default auto).
pathYesPath of the CSV, TSV or JSON file, absolute or relative to the server's working directory; the format follows the extension.
groupNoColumn with group names (box/violin: one box per group).
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.1
    • 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 / path / description
      Previous value: -"Path of the CSV/TSV/JSON file."New value: +"Path of the CSV, TSV or JSON file, absolute or relative to the server's working directory; the format follows the extension."
    • 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.5/5.0
Behavior4/5

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

Adds substantial context beyond the annotations: reads only, no network, and writes nothing unless 'output' is supplied, which reconciles with destructiveHint=true since that parameter can create files. It also discloses error semantics (missing file, unknown column, zero rows) as error results with explanatory text. The only omission is that overwriting an existing file at 'output' is mentioned only in the schema, not the description.

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-loads the purpose, then uses labeled sections (When to use / How / Behavior) that map cleanly to the agent's decision process. Slightly dense for a single paragraph and the phrase 'the common kinds below' gestures at a list that isn't rendered, but no sentence is padding.

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?

For an 11-parameter tool with no output schema, the description covers the return value (PNG plus text summary of columns found and what was drawn draws directly on the 'text summary' clause), the input-format rules, and failure modes. Remaining gaps (themes, width/height, image=false) are fully handled by the schema, so nothing an agent needs 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 would be 3, but the description adds real meaning the schema lacks: the default resolution rules for kind=auto (line for numeric x, bars for text x, histogram for a single numeric column) and what correlation draws. It also documents accepted JSON shapes (array of objects or {column: [values]}), which no single parameter description conveys.

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 ('Chart the columns of a CSV, TSV or JSON file on disk') plus what it returns (PNG image and text summary). This is clearly distinguished from the sibling 'plot', which handles data already in the conversation.

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 explicit when-to-use ('the data is in a file the server can read, especially a large one'), an exclusion (data already in the conversation), and names the alternative ('use plot, which also offers all 44 chart types'). The routing decision is unambiguous before opening any schema.

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