Skip to main content
Glama
logisky

logisheets-mcp

edit_pivot

Modify an existing pivot's grouping, measures, order, or filters while keeping its ref name and formulas intact. Use it to repair broken pivots that read 0 instead of erroring.

Instructions

Change an existing pivot's recipe — what it groups by, what it measures, how, in what order, over which records — and reshape it to match.

Use this rather than deleting and recreating: the block keeps its ref name, so every formula pointing at it keeps working, and the whole change is one undo.

This is also the way to REPAIR a pivot whose recipe stopped resolving (describe_block reports pivot_is_broken) — for instance after a source field was renamed. A broken pivot reads 0 in every cell rather than erroring, so it must be fixed, not refreshed: a refresh fails the same way.

Everything you omit is UNCHANGED. What you pass replaces that part outright — filters: [] clears the filters, columns: null turns a cross-tab into a simple group-by.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
funcNoNew aggregate. Omit to keep the current one.
nameYesRef name of the pivot block.
rowsNoNew row dimension. Its values must repeat. Omit to keep the current one.
orderNoNew row order. Omit to keep the current one.
columnsNoNew column dimension. Pass null to drop the columns and make it a simple group-by. Omit to keep the current one.
filtersNoReplaces the current filters outright. Pass an empty array to count every record again.
measureNoNew field to aggregate. Omit to keep the current one.
row_totalNoName for a column totalling each row across every column value. Replaces the declared columns along with `extra_measures`.
order_valuesNoThe row sequence for `order: custom`.
extra_measuresNoReplaces the declared extra columns outright, together with `row_total`. Omit BOTH to keep the ones the pivot has.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations are minimal (readOnlyHint=false, destructiveHint=false), so the description carries the full burden. It discloses the behavior of omitted vs. passed parameters ('Everything you omit is UNCHANGED. What you pass replaces that part outright'), explains the undo capability, and details the broken-pivot behavior (reads 0 in every cell, must be fixed not refreshed). This goes well beyond the annotations and is highly transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured: it opens with purpose, then usage rationale, then repair scenario, then semantics. Every sentence serves a distinct function, with no fluff. It front-loads the core action and quickly moves to decision-relevant details, making it easy for an agent to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 10 parameters and no output schema, the description covers all critical operational context: when to use vs. alternatives, how to repair a broken pivot, the exact behavior of omission vs. replacement, and the interaction with refresh. It does not describe return values, but for a mutation tool that's acceptable and not a gap. The description is sufficiently complete for correct invocation.

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 coverage is 100% and every parameter already includes 'Omit to keep the current one' and specific semantics like 'Pass null to drop the columns'. The description adds a global principle ('Everything you omit is UNCHANGED') but this largely reiterates what the schema already states. Thus it provides no additional meaning beyond the schema, so the baseline 3 is appropriate.

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 clearly states the tool's purpose: 'Change an existing pivot's recipe' and enumerates the aspects it can modify (grouping, measure, order, filters, columns). It also differentiates from siblings by naming the alternative approaches (deleting/recreating, refresh) and specifying when this tool is the right choice.

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

Usage Guidelines5/5

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

The description explicitly says 'Use this rather than deleting and recreating' and explains why (keeps ref name, one undo). It also provides a specific use case for repairing broken pivots and contrasts with refresh ('a refresh fails the same way'). This gives clear guidance on when to use and when not to.

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