Skip to main content
Glama
senoff

xlsx-for-ai

xlsx_pivot

Read-onlyIdempotent

Reshape a flat table from a .xlsx file into a 2D matrix, aggregating values across index and columns. Choose from sum, mean, min, max, count, or count_distinct.

Instructions

pandas-style pivot_table() on a LOCAL .xlsx file — reshape a flat table into a 2D matrix where rows are unique values of index, columns are unique values of columns, and cells are an aggregation of values. agg modes: sum / mean / min / max / count / count_distinct. Optional fill_value for missing index×column combinations.

USE WHEN: the user wants a cross-tab — "X by Y", "rows by columns" — that needs more than groupby. Returns a markdown table.

DO NOT USE WHEN: there's only one grouping dimension (use xlsx_aggregate). Or for upload/attached files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aggNo
columnsNo
file_b64Yes
indexYes
optionsNo
valuesYes
Behavior4/5

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

Annotations already declare the tool as read-only and idempotent. The description adds aggregation modes, fill_value, and return format (markdown table). However, it does not clarify that file_b64 is base64 content, creating a minor inconsistency with 'LOCAL .xlsx file'.

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 concise and well-structured: first a defining sentence, then details, then usage guidelines. Every sentence adds value, and the structure aids readability.

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?

Given the complexity of a pivot operation and no output schema, the description adequately explains the output (markdown table) and usage context. It distinguishes from xlsx_aggregate but not from other siblings like xlsx_read, which is acceptable due to specific 'USE WHEN'.

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?

With 0% schema coverage, the description explains most parameters (index, columns, values, agg, fill_value) but omits options.header_row and options.sheet, and only implicitly describes file_b64. Coverage is about 66%, not fully compensating.

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 performs a pandas-style pivot_table on a local .xlsx file, reshaping data into a 2D matrix with index, columns, and aggregation. It explicitly distinguishes from groupby operations.

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 includes explicit 'USE WHEN' and 'DO NOT USE WHEN' sections, providing clear criteria for when to pivot versus using xlsx_aggregate, and noting it is not for upload or attached files.

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/senoff/xlsx-for-ai'

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