Skip to main content
Glama

get_diagnostic_plot

Generate a diagnostic plot for a single column, automatically selecting the best chart type based on the column's classification (continuous, discrete, categorical, binary, temporal), and save as PNG.

Instructions

Generate and save a diagnostic plot for a single column as a PNG file. The plot type is automatically selected based on the column's classification:

  • continuous: 2x2 panel — histogram with KDE overlay, boxplot with outliers, QQ plot with reference line, ECDF

  • discrete: bar chart of value counts and boxplot side by side

  • categorical: horizontal bar chart of top 20 values with percentage labels

  • binary: bar chart of class balance with proportion labels; bars are red if the majority:minority ratio exceeds 3:1

  • temporal: line plot of counts over time and bar chart of counts by month

  • high_cardinality: no plot is generated; a message is returned instead

Saves the PNG to output_dir/{column}_diagnostics.png and returns the file path. Use output_dir to control where plots land — the same folder as the dataset or a dedicated output directory both work well.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
columnYes
output_dirYes
tableNo
Behavior5/5

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

With no annotations, the description fully discloses behaviors: auto-selects plot type per column type, handles high_cardinality by returning a message, saves to output_dir, returns file path. This is comprehensive and leaves no ambiguity about side effects.

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?

The description is well-structured with front-loaded purpose and organized bullet list for plot types. It is detailed but not overly verbose; each section serves a purpose. Minor redundancy in listing all plot types could be condensed.

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?

Given the tool's complexity (multiple column types, automatic selection) and lack of output schema, the description covers all essential behavior: input handling, output path, return value, and special cases (high_cardinality). It is sufficient for an agent to correctly invoke the tool.

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 coverage is 0%, but the description adds value for output_dir by explaining its purpose. However, file_path, column, and table are not described beyond schema names. The description partially compensates but leaves gaps.

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 generates and saves a diagnostic plot as PNG, and details automatic plot type selection per column classification. This distinguishes it from siblings like get_column_summary or get_correlations which serve different purposes.

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?

The description implies the tool is for diagnostic visualization but does not explicitly state when to use it versus siblings like get_column_summary or get_all_summaries. No guidance on when not to use it or prerequisites is provided.

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/MLMecham/eda-mcp'

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