Skip to main content
Glama

pivot_table

Summarize data with pivot tables and reshape from long to wide format for reporting.

Instructions

Create a pivot table. Stores result as a new dataframe. Creates summary tables. Use for reporting or reshaping data from long to wide format. Example: pivot_table(index=["City"], columns="Category", values="Revenue", agg_func="mean")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYes
valuesYes
columnsYes
df_nameNo
agg_funcNomean
result_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description carries full burden. It discloses a key behavior: 'Stores result as a new dataframe', and implies summary generation. However, it doesn't elaborate on side effects, handling of missing data, or how the original dataframe is affected. Some behavioral detail is present but not rich.

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, front-loaded, and includes a concrete example. Every sentence adds value; the example is particularly useful for parameter understanding without being verbose.

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 six parameters and zero schema documentation, the description is adequate but incomplete. It provides a use case and example, and the output schema covers return values, but it does not explain all parameters (df_name, result_name) or clarify how the tool integrates with the dataflow context. Reasonable for an agent but with gaps.

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 description coverage is 0%, so the description must compensate. The example demonstrates usage of index, columns, values, and agg_func, but df_name and result_name are not explained. The example adds partial meaning, yet fails to fully cover all six parameters.

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 the tool's function: 'Create a pivot table' and 'Create summary tables' with a specific example. It distinguishes from siblings by mentioning 'reshaping data from long to wide format', which contrasts with melt_dataframe, though it doesn't name alternatives explicitly.

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?

Provides clear usage context: 'Use for reporting or reshaping data from long to wide format.' This tells when to apply the tool, but doesn't explicitly state when not to use it or mention alternative tools by name.

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/AstyanM/mcp-data-science'

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