Skip to main content
Glama

Manage charts

manage_charts
Destructive

Add, update, or delete embedded charts in Google Sheets by defining chart type, data ranges, and placement. Supports standard chart types or custom Sheets API specs.

Instructions

Manages embedded charts. action=add builds a chart from chart_type (COLUMN/BAR/LINE/AREA/STEPPED_AREA/SCATTER/PIE), domain_range (x-axis labels / pie labels), series_ranges (one grid range per data series; PIE takes exactly one) and optional title/legend_position/header_count (rows of the ranges treated as headers, default 1) — place it with anchor {sheet_id,row_index,column_index} (the cell under the chart's top-left corner) or new_sheet=true for its own chart sheet; the reply carries the new chartId. Ranges should be single columns (or rows) including the header cell. For chart kinds beyond the basic set (combo, waterfall, histogram, org …) pass a raw Sheets API ChartSpec via spec instead — it overrides the simplified fields. action=update REPLACES the whole spec of an existing chart (chart_id + the same spec-building fields; there is no partial chart update). action=delete removes the chart by chart_id. Find chartIds via get_spreadsheet (sheets[].charts).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specNoRaw Sheets API ChartSpec — full control; overrides the simplified fields above.
titleNoChart title.
actionYesWhat to do with the charts.
anchorNoadd: place the chart over the grid, top-left at this cell.
chart_idNoupdate/delete: the chartId from get_spreadsheet or the add reply.
new_sheetNoadd: put the chart on its own new chart sheet instead.
chart_typeNoadd/update: the chart kind (required unless spec is given).
domain_rangeNoThe x-axis (or pie label) values, incl. header cell.
header_countNoHow many leading rows of the ranges are headers (default 1).
series_rangesNoOne range per data series, incl. header cells (PIE: exactly one).
spreadsheet_idYesThe spreadsheet id — the long id from the URL (docs.google.com/spreadsheets/d/<spreadsheetId>/edit) or from create_spreadsheet / search_spreadsheets output.
legend_positionNoBOTTOM_LEGEND, LEFT_LEGEND, RIGHT_LEGEND, TOP_LEGEND or NO_LEGEND (default: API's choice).
Behavior5/5

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

Annotations already mark destructiveHint=true, and the description adds specifics: delete removes the chart by chart_id, while update REPLACES the entire spec with no partial mutation. It also discloses that spec overrides the simplified fields, which is useful behavioral context beyond the annotations.

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 dense but lean, front-loading the tool's purpose and moving through actions in a logical order. Parenthetical definitions compress a lot of parameter meaning. It could be easier to scan with line breaks, but no sentence is filler.

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 12-parameter tool with no output schema, the description covers all key workflow elements: how to describe ranges, how to place the chart, how chart IDs are obtained, and what the add reply returns. The only mild gap is that update does not state whether position fields are honored or ignored, but overall it is sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so a baseline of 3 applies. The prose adds practical semantics beyond the schema: ranges must be single columns/rows including the header cell, header_count defaults to 1, PIE takes exactly one range, and spec overrides the simplified fields. That extra guidance justifies a 4.

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 'Manages embedded charts' and then enumerates the three selectable actions (add/update/delete), specifying that add builds a chart from chart_type plus data ranges. This clearly distinguishes the tool from sibling spreadsheet tools and from raw_request.

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?

It gives action-by-action guidance: add uses chart_type and ranges, update replaces the whole spec and explicitly rules out partial updates, and delete removes by chart_id. It also tells the agent where to find chartIds (get_spreadsheet) and that non-basic chart kinds should go through spec rather than the simplified fields.

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/A1-x-Tech/mcp-google-sheets'

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