Skip to main content
Glama

add_pivot_table

Destructive

Create a pivot table from source data in Google Sheets by specifying source range, row grouping, value aggregation columns, and target location.

Instructions

Create a pivot table from source data.

Args: spreadsheet_id: The ID of the spreadsheet source_sheet: Sheet name containing source data source_range: A1 range of source data (e.g., 'A1:E100') target_sheet: Sheet name to place the pivot table target_cell: Cell to anchor the pivot table (default 'A1') row_columns: List of 0-based column indices for row grouping (e.g., [0, 1]) value_columns: List of 0-based column indices to aggregate (e.g., [3, 4]) aggregation: Aggregation function — 'SUM', 'COUNTA', 'AVERAGE', 'MAX', 'MIN'

Returns: Result of the pivot table creation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spreadsheet_idYes
source_sheetYes
source_rangeYes
target_sheetYes
target_cellNoA1
row_columnsNo
value_columnsNo
aggregationNoSUM

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

The annotations include destructiveHint=true, indicating mutation. The description adds no additional behavioral information beyond stating it creates a pivot table. It does not disclose side effects, required permissions, error handling, or return value details beyond a vague statement.

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 well-structured with an Args list, making it easy to parse. It is efficient with no fluff, though the 'Returns' line is vague and could be omitted if output schema suffices. Overall, it earns its place.

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 complexity (8 parameters) and lack of schema descriptions, the description covers parameter meanings but lacks workflow context, error scenarios, or data requirements (e.g., headers). With an output schema present, the return value vagueness is acceptable, but more context would improve completeness.

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

Parameters5/5

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

With schema description coverage at 0%, the description fully compensates by providing clear, concise explanations for all 8 parameters, including examples and default values. This adds significant meaning beyond the schema titles.

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 'Create a pivot table from source data,' which is a specific verb and resource. It distinguishes from siblings as none of the listed sibling tools create pivot tables. However, it lacks explicit mention of the spreadsheet context (Google Sheets), though parameters imply it.

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?

No usage guidelines are provided. The description does not state when to use this tool versus alternatives, nor does it mention prerequisites or when not to use it. There is no guidance on context or best practices.

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/socar-edwin/mcp-google-sheets-extended'

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