Skip to main content
Glama

extract_chart

Extracts structured chart data from images, returning chart type, data series, axis labels, and geometry per panel. Converts chart images into machine-readable data without guessing uncertain panels.

Instructions

Extract chart data from an image.

Provide exactly one of image_base64 (raw base64, no data: prefix) or image_url. Returns {panels: [{box, chart_type, axis, data, geometry, axis_labels}], meta}. When the extractor is not confident a panel returns data: null — never guessed.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "extract_chart"
  }
}

Input Schema

NameRequiredDescriptionDefault
image_urlNo
image_base64No
include_geometryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose a genuinely non-obvious behavioral trait: low-confidence panels return data: null rather than guessed values, which tells the agent how to interpret gaps. It also declares the response envelope. It omits any mention of limits, cost, or failure modes for malformed images.

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 short lines, front-loaded with the action, then the input constraint, then the return contract. No redundant restatement of the tool name and no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The return-shape sentence is valuable given there is no output schema, and the abstention behavior is covered. But for a three-parameter tool with zero schema descriptions, leaving include_geometry unexplained and omitting any input constraints (formats, size) leaves the definition short of complete.

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 description coverage is 0%, so the description must compensate. It adds real meaning for two parameters — exact mutual exclusivity and the "raw base64, no data: prefix" formatting rule — but include_geometry (default true) is never mentioned, leaving its effect undocumented anywhere.

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?

"Extract chart data from an image" gives a specific verb (extract) and resource (chart data) plus the input medium (image), which implicitly separates it from the PDF sibling. It stops short of naming or contrasting that sibling explicitly, so the differentiation is inferable rather than stated.

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

Usage Guidelines3/5

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

Usage is implied by the input modality (image rather than PDF) and the description states the one-of constraint between image_base64 and image_url, which is real guidance. However there is no explicit statement of when to prefer this over extract_chart_pdf, nor any note on image format/size prerequisites.

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