Skip to main content
Glama

create_interactive_pivot

Create a real Excel PivotTable with interactive drag-and-drop fields, expand/collapse, and refresh. Use it when static summaries and filters are not enough for exploring data.

Instructions

Create an INTERACTIVE PivotTable (a real Excel PivotTable object).

Difference from create_pivot (static summary):

  • create_pivot : writes aggregated numbers into cells - fast but static

  • create_interactive_pivot: injects real OOXML pivot parts, so in Excel you can drag fields, expand/collapse and refresh (structure validated with LibreOffice)

Args:

  • rows / columns / values: row / column (cross-tab) / value fields

  • agg_func: sum / count / average / min / max (default sum)

  • page_fields: report filter fields

  • filters: row filters (same format as filter_count)

  • target_sheet: target worksheet (created if missing)

  • location: top-left anchor (default A3)

LIMITATIONS:

  1. Saving this file again with openpyxl (incl. this server's write_cells) will DROP the PivotTable - openpyxl cannot write pivot parts back. Generate it LAST.

  2. Not supported: field grouping, calculated fields/items, slicers, timelines, multiple sources, data model.

  3. LibreOffice recognizes it but interacts more weakly than Excel.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsYes
valuesYes
columnsNo
filtersNo
agg_funcNosum
locationNoA3
file_pathYes
page_fieldsNo
source_sheetNo
target_sheetNoPivotTable

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full transparency burden, and it excels: it discloses that the tool injects real OOXML pivot parts, is validated with LibreOffice, lists unsupported features (grouping, calculated fields, slicers, etc.), and warns that LibreOffice interacts more weakly than Excel. This goes well beyond a typical description and preempts behavioral surprises.

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 with clear sections—difference from `create_pivot`, args list, and limitations—and it front-loads the key differentiator. Every sentence serves a purpose, and the length is appropriate for a complex tool with 10 parameters and significant caveats.

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 10-parameter tool with no annotations and no output schema, this description is remarkably complete: it covers purpose, alternatives, parameter meanings, and limitations. Yet it leaves `file_path` and `source_sheet` unexplained and does not mention what the tool returns (e.g., success message), which would be necessary for full standalone completeness.

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?

The schema has 0% description coverage, so the description must compensate. It does explain the meanings of rows/columns/values, agg_func, page_fields, filters, target_sheet, and location, which covers most parameters. However, it omits `file_path` and `source_sheet` entirely, leaving those to be inferred from the schema or context, which is a minor gap.

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 states exactly what the tool does: 'Create an INTERACTIVE PivotTable (a real Excel PivotTable object).' It then contrasts this with `create_pivot` (static summary), making the purpose and distinction from the sibling tool immediately clear. The verb-resource pair is specific and unambiguous.

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 provides explicit guidance on when to use this tool versus `create_pivot`: use this when you need a real interactive Excel PivotTable with drag/expand/collapse/refresh, and `create_pivot` for fast static aggregations. It also gives a critical usage constraint—'Generate it LAST' because saving with openpyxl will drop the PivotTable—which prevents a common mistake.

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