Skip to main content
Glama

generate_bar_chart

Read-only

Create horizontal bar charts to visualize numerical comparisons across categories, supporting grouped or stacked data with customizable styles and themes.

Instructions

Generate a horizontal bar chart to show data for numerical comparisons among different categories, such as, comparing categorical data and for horizontal comparisons.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesData for bar chart, such as, [{ category: '分类一', value: 10 }, { category: '分类二', value: 20 }], when grouping or stacking is needed for bar, the data should contain a `group` field, such as, when [{ category: '北京', value: 825, group: '油车' }, { category: '北京', value: 1000, group: '电车' }].
groupNoWhether grouping is enabled. When enabled, bar charts require a 'group' field in the data. When `group` is true, `stack` should be false.
stackNoWhether stacking is enabled. When enabled, bar charts require a 'group' field in the data. When `stack` is true, `group` should be false.
styleNoStyle configuration for the chart with a JSON object, optional.
themeNoSet the theme for the chart, optional, default is 'default'.default
widthNoSet the width of chart, default is 600.
heightNoSet the height of chart, default is 400.
titleNoSet the title of chart.
axisXTitleNoSet the x-axis title of chart.
axisYTitleNoSet the y-axis title of chart.
Behavior3/5

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

Annotations provide readOnlyHint=true, indicating this is a safe read operation that doesn't modify data. The description adds that it 'generates' a chart, which aligns with the read-only nature. However, it doesn't disclose important behavioral aspects like whether this creates a file, returns an image URL, generates HTML, or has any rate limits or authentication requirements. With annotations covering the safety profile, the description adds minimal behavioral context beyond what's already implied.

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 reasonably concise at one sentence that directly states the tool's purpose. However, the phrasing 'such as, comparing categorical data and for horizontal comparisons' is somewhat redundant and awkwardly structured. The core information is front-loaded, but the sentence could be more polished and efficient in its expression.

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?

Given the tool's complexity (10 parameters, nested objects) and lack of output schema, the description is minimally adequate. It identifies the tool as a chart generator but doesn't explain what format the output takes (image, URL, HTML, etc.) or provide context about the visualization library or constraints. With rich schema documentation but no output information, the description meets basic requirements but leaves important contextual gaps.

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 100%, meaning all parameters are well-documented in the schema itself. The description mentions 'data for numerical comparisons among different categories' which hints at the 'data' parameter's purpose, but doesn't add meaningful semantic context beyond what the schema already provides. With comprehensive schema documentation, the baseline score of 3 is appropriate as the description doesn't significantly enhance parameter understanding.

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?

The description clearly states the tool's purpose: 'Generate a horizontal bar chart to show data for numerical comparisons among different categories.' It specifies the chart type (horizontal bar chart) and its use case (numerical comparisons among categories). However, it doesn't explicitly distinguish this tool from its many sibling chart-generation tools beyond mentioning 'horizontal bar chart,' which leaves some ambiguity about when to choose this over other chart types.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With 24 sibling chart tools available, there's no mention of when a horizontal bar chart is appropriate compared to column charts, line charts, pie charts, or other visualization types. The description only states what the tool does, not when it should be selected over other options.

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/antvis/mcp-server-chart'

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