Skip to main content
Glama

plot_histogram

Visualize numeric distributions with customizable bins, KDE overlay, and log scaling. Use to detect skewness, bimodality, or subgroups during exploratory data analysis.

Instructions

Plot a histogram for a numeric column with optional KDE overlay and log-scaled x-axis. Use during EDA to understand numeric distributions. Set log_scale=True for skewed data (revenue, prices) — otherwise histogram is unreadable. Check for bimodality indicating subgroups. Example: plot_histogram(column="Revenue", bins=50, kde=True, log_scale=True)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kdeNo
binsNo
columnYes
df_nameNo
log_scaleNo
save_pathNo
Behavior3/5

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

With no annotations, the description is the sole source of behavioral disclosure. It discloses useful behavior (KDE overlay, log scaling) and even warns that a histogram on skewed data is unreadable without log scaling. However, it leaves out important details such as what the function returns, whether it displays the plot, how save_path influences behavior, and how the dataframe is selected (df_name).

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?

The description is compact, front-loaded with the core purpose, and followed by one sentence of usage guidance and a valuable example. Every sentence earns its place, with no redundant or trivial content.

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 a plotting tool with six parameters, no output schema, and no annotations, the description delivers a solid overview: purpose, use case, parameter advice, and an example. The only gaps are the unexplained df_name and save_path parameters and lack of output/return details, which prevent a perfect score.

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?

The schema provides 0% property descriptions, so the description must compensate. It explains column, bins, kde, and log_scale, and provides a concrete example. However, df_name and save_path are not described, leaving two of six parameters without semantic guidance beyond their names and defaults.

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 opens with a clear, specific action: 'Plot a histogram for a numeric column' and mentions optional KDE overlay and log scaling. This distinguishes it from sibling plot tools (e.g., plot_bar, plot_scatter) and precisely communicates the tool's primary function.

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

Usage Guidelines4/5

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

The description explicitly places the tool in the EDA workflow ('Use during EDA to understand numeric distributions') and provides actionable guidance on when to enable log_scale for skewed data and to check for bimodality. It does not reference alternative tools, but the context given is clear and specific enough.

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/AstyanM/mcp-data-science'

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