Skip to main content
Glama

Create chart

create_chart

Add native Excel charts from worksheet ranges. Build bar, line, pie, or scatter charts with titles, category labels, and a chosen target cell directly on the same sheet.

Instructions

Add a native Excel chart built from ranges on the same sheet.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sheet": "<sheet>",
      "chart_type": "<chart_type>",
      "data_range": "<data_range>"
    },
    "name": "create_chart"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoFile path or preloaded name (list_configured_files). Omit if only one file is preloaded.
sheetYesSheet name (case-sensitive).
titleNoChart title.Chart
backupNoSave a .bak copy first. Default: XLSX_MCP_AUTO_BACKUP (true).
reasonNoWhy; kept in the change log (XLSX_MCP_CHANGE_LOG=true).
chart_typeYesChart kind: "bar", "line", "pie" or "scatter".
data_rangeYesSeries values with the series name in the first row, e.g. "B1:B10".
target_cellNoCell where the chart's top-left corner is placed.E2
categories_rangeNoCategory labels, e.g. "A2:A10".

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv0.4.0
    • addedInput schema / properties / backup / description
      Added value: +"Save a .bak copy first. Default: XLSX_MCP_AUTO_BACKUP (true)."
    • addedInput schema / properties / categories_range / description
      Added value: +"Category labels, e.g. \"A2:A10\"."
    • addedInput schema / properties / chart_type / description
      Added value: +"Chart kind: \"bar\", \"line\", \"pie\" or \"scatter\"."
    • addedInput schema / properties / chart_type / enum
      Added value: +[
      +  "bar",
      +  "line",
      +  "pie",
      +  "scatter"
      +]
    • addedInput schema / properties / data_range / description
      Added value: +"Series values with the series name in the first row, e.g. \"B1:B10\"."
    • addedInput schema / properties / path / description
      Added value: +"File path or preloaded name (list_configured_files). Omit if only one file is preloaded."
    • addedInput schema / properties / reason
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Why; kept in the change log (XLSX_MCP_CHANGE_LOG=true).",
      +  "title": "Reason"
      +}
    • addedInput schema / properties / sheet / description
      Added value: +"Sheet name (case-sensitive)."
    • addedInput schema / properties / target_cell / description
      Added value: +"Cell where the chart's top-left corner is placed."
    • addedInput schema / properties / title / description
      Added value: +"Chart title."
  2. Addedv0.3.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations only declare openWorldHint=false and destructiveHint=false; there is no readOnlyHint, so the agent gets no structured signal that this writes to the workbook. The description adds the useful qualifier that the chart is a native Excel object built from same-sheet ranges, but it omits that the file is modified, whether an existing chart at the target cell is overwritten, and how backup/change-log behavior works.

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?

A single front-loaded sentence with zero filler; the verb and resource come first and the scoping constraint follows immediately. Brevity is a virtue here, though the terseness means there is no structural room for caveats.

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?

An output schema exists, so return values need not be explained, and the nine parameters are fully documented in the schema. What the description does not cover is the mutation profile of a nine-parameter write operation — file modification, backup defaults, and chart placement/overwrite behavior — which matters because the annotations do not include readOnlyHint.

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%, so all nine parameters (path, sheet, data_range, categories_range, target_cell, backup, reason, chart_type, title) are already documented in the schema. The description only reinforces the same-sheet restriction that applies to data_range and categories_range, adding little beyond the structured fields. Baseline 3 is appropriate.

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?

"Add a native Excel chart built from ranges on the same sheet" gives a specific verb (Add), a specific resource (native Excel chart), and a source constraint (ranges on the same sheet). That distinguishes it from write-oriented siblings such as create_table or set_cell_style, though it never names an alternative explicitly.

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 phrase "on the same sheet" implies a usage boundary (no cross-sheet data sources), which is genuinely useful for selecting this tool. However, there is no explicit when-to-use/when-not-to-use guidance and no mention of how it relates to siblings like create_table or set_cell_style, leaving the agent to infer context.

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