Skip to main content
Glama

insertChart

Adds bar, line, pie, treemap, and other charts to Google Sheets from a specified data range, placing them as overlays at an anchor cell.

Instructions

Inserts a chart into a Google Sheet. Supports bar, column, line, area, scatter, pie, donut, and treemap (hierarchical) chart types. For treemap charts, the data must have a label column and a parent label column (use empty string for root nodes) plus a numeric size column. Chart is placed as an overlay at the specified anchor cell.

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": {
      "spreadsheetId": "<spreadsheetId>",
      "chartType": "<chartType>",
      "dataRange": "<dataRange>"
    },
    "name": "insertChart"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleNoChart title.
anchorRowNoRow index (0-based) of the anchor cell for chart placement.
chartTypeYesChart type to create.
dataRangeYesA1 notation range of the data (e.g., "A1:E50"). Include the header row if present.
headerRowNoWhether the first row of the data range is a header row.
sheetNameNoName of the sheet/tab containing the data. Defaults to the first sheet.
stackedTypeNoFor bar/column/area charts: whether to stack series. NOT_STACKED = grouped, STACKED = absolute stacked, PERCENT_STACKED = 100% stacked.NOT_STACKED
widthPixelsNoChart width in pixels.
anchorColumnNoColumn index (0-based) of the anchor cell for chart placement.
heightPixelsNoChart height in pixels.
offsetXPixelsNoHorizontal offset in pixels from the anchor cell.
offsetYPixelsNoVertical offset in pixels from the anchor cell.
spreadsheetIdYesThe spreadsheet ID — the long string between /d/ and /edit in a Google Sheets URL.
labelColumnIndexNoFor pie/donut/treemap: 1-based column index for node labels (default: 1). For treemap this is the leaf/child label.
valueColumnIndexNoFor pie/donut/treemap: 1-based column index for the numeric size/value (default: 2).
parentColumnIndexNoFor treemap: 1-based column index for parent node labels. Root nodes should have an empty string in this column.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.0-rc.1

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It usefully discloses that the chart is placed as an overlay at the specified anchor cell and states the treemap data-shape requirement, but it omits whether the call needs write access, whether an existing chart is replaced or duplicated, and what the call returns (e.g., a chart ID).

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?

Three compact sentences, front-loaded with the core action and chart-type enumeration before the treemap constraint and placement note. No filler, though the treemap sentence is somewhat dense relative to the rest.

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?

For a 16-parameter mutation tool with no annotations and no output schema, the description covers chart types and treemap data requirements but leaves the agent guessing about permissions, return value, and whether the chart replaces or coexists with existing overlays. Adequate but with clear gaps given the tool's complexity.

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 16 parameters including the treemap column indices and pixel offsets are already documented in the schema. The description's treemap sentence largely restates what the schema says, adding only modest prose-level emphasis on the label/parent/size structure; baseline 3 applies.

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 opens with a specific verb and resource ('Inserts a chart into a Google Sheet') and enumerates the eight supported chart types, so the operation is unambiguous. It does not explicitly contrast with the sibling deleteChart, but the insert-vs-delete distinction is self-evident from the verb.

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?

Usage is implied by the tool name and the chart-type list, and the description supplies a genuine prerequisite for treemap charts (label column, parent label column with empty string for roots, numeric size column). It gives no when-not-to-use guidance, no mention of alternatives such as deleteChart for replacing an existing chart, and no note on required edit permissions.

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

Deploy Server

Other Tools