Skip to main content
Glama

pivot_column

Transform a table by pivoting an attribute column's distinct values into new columns, aggregating a value column with Sum, Count, Average, Min, or Max. Updates the Power Query M code directly.

Instructions

Power Query Pivot Column: turn the distinct values of an attribute column into new columns, aggregating a value column. Appends Table.Pivot to the table's M query. aggregation = Sum | Count | Average | Min | Max (default Sum).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
sessionIdYes
aggregationNoSum | Count | Average | Min | Max (default Sum)
valueColumnYesthe column whose values fill the pivoted cells
partitionNameNopartition name (optional; defaults to the first partition)
attributeColumnYesthe column whose distinct values become new column headers
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that Table.Pivot is appended to the M query and lists aggregation options, which is useful. However, it does not mention side effects such as whether the attribute column is removed, the impact on existing columns, or any reversibility concerns. This is a meaningful gap for a mutating transformation.

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 exceptionally concise: one sentence that clearly states the action and a short list of aggregation options. Every element earns its place, and the key information is front-loaded with the phrase 'Power Query Pivot Column' immediately signaling the tool's purpose.

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?

The description covers the core pivot action, the M query modification, and the aggregation parameter thoroughly. It omits details about partitionName and sessionId, which are present in the schema, but these are optional or context-level. Overall, it provides enough information for an agent to understand the main behavior and select the tool correctly.

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?

Schema description coverage is 67%, but the description adds significant meaning beyond it. It clarifies the roles of attributeColumn and valueColumn by explaining the pivoting mechanism, and it explicitly defines the aggregation parameter with allowed values and default. The optional partitionName is not explained, but the key parameters are well covered.

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 verb ('turn... into new columns') and the resource (attribute column), which is a specific pivot operation. It distinguishes from sibling tools like unpivot_columns and pivot_text_values by explaining the aggregation of a value column and the use of Table.Pivot.

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

Usage Guidelines3/5

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

The description implies usage for Power Query pivot transformations, but it does not explicitly state when to use this tool versus alternatives (e.g., unpivot_columns, pivot_text_values) or provide exclusions. It provides context ('Power Query Pivot Column', 'Appends Table.Pivot') but no direct guidance.

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/cyphonica/powerbi-pbix-mcp'

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