Skip to main content
Glama

chart_from_csv

Parse raw CSV text and generate a chart. Automatically identifies numeric columns for data series and non-numeric columns for labels.

Instructions

Parse raw CSV text and generate a chart directly from it, without requiring the caller to pre-process the data. The tool auto-detects numeric columns for the y-axis and uses the first non-numeric column as x-axis labels. Use this when the user provides CSV content directly; for data already in a Python list or dict use create_chart instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
csv_dataYesComplete CSV text including a header row. Columns are auto-classified as labels (non-numeric) or data series (numeric). Newlines should be literal line breaks. Example header row: Month,Sales.
chart_typeNoThe type of chart to render. Defaults to 'auto', which picks the best type based on the data shape. See list_chart_types for descriptions of each option.auto
x_columnNoName of the CSV column to use as x-axis category labels. If omitted, the first non-numeric column is used automatically. Example: 'Month'.
y_columnsNoNames of CSV columns to plot as data series. If omitted, all numeric columns (except x_column) are used. Example: ['Revenue', 'Costs'].
titleNoOptional chart title rendered above the plot area. Example: 'Q1 Sales by Region'.
themeNoVisual theme. Pass a preset name ('light', 'dark', 'high-contrast') or a palette name ('viridis', 'inferno', etc.) as a string, or a config object. Use list_themes to see all options.
output_formatNoFormat for the returned chart: 'svg' (default), 'html', 'data_url' (SVG data URL), or 'png' (rasterized image, requires charted[png]).svg
scaleNoResolution multiplier for 'png' output. Default 2 gives high-DPI output. Has no effect for SVG formats.
save_pathNoOptional file path to also save the chart on disk. Extension should match output_format, e.g. 'output/chart.svg'. The tool still returns the chart content in the response.
Behavior4/5

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

The description discloses that the tool auto-detects numeric columns for y-axis and first non-numeric column as x-axis labels, which adds value beyond the schema. However, it does not mention error handling, CSV size limits, or the fact that it requires a header row (though schema covers this). No annotations are present, so the description carries the burden.

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?

Two sentences, no fluff. First sentence states the core function and auto-detection; second provides usage guidelines and sibling tool reference. Every sentence serves a purpose.

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?

Given the complexity (9 parameters, multiple output formats, themes), the description covers the essential use case and distinguishes from siblings. It does not mention output_format, theme, or save_path, but these are fully documented in the schema (100% coverage). The description completes the agent's decision-making context.

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 baseline is 3. The description adds value by explaining the auto-detection logic for x_column and y_columns, which is not present in the schema param descriptions. This helps the agent understand the default behavior without reading the schema in detail.

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?

The description clearly states the tool parses raw CSV text and generates a chart, with automatic column detection. It distinguishes itself from create_chart by specifying the input format (CSV text vs. Python list/dict).

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?

Explicitly tells when to use this tool ('when the user provides CSV content directly') and when to use create_chart instead ('for data already in a Python list or dict'). Provides clear context and alternative.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/marzukia/charted'

If you have feedback or need assistance with the MCP directory API, please join our Discord server