Skip to main content
Glama

set_aggregation

Define an aggregation mapping from a detail column to a base column or table, enabling the engine to answer queries using the smaller pre-aggregated table.

Instructions

Define a user-defined AGGREGATION: mark a column on a (typically pre-aggregated) detail table as the aggregate of a base column or table, so the engine can transparently answer queries from the smaller table. summarization = GroupBy | Sum | Count | Min | Max. For GroupBy, baseColumnOrTable is a Table[Column]; for the aggregate functions it's the base table name (or a Table[Column]).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYesthe detail/aggregation table the column is on
sessionIdYes
detailColumnYesthe column being mapped
summarizationYesGroupBy | Sum | Count | Min | Max
baseColumnOrTableYesthe base column (Table[Column]) for GroupBy, or the base table name for Sum/Count/Min/Max
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It explains the engine's ability to 'transparently answer queries from the smaller table' and clarifies the semantic difference for GroupBy vs aggregate functions. However, it does not mention potential overwrites, reversibility, prerequisite conditions, or effects on existing model relationships.

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?

Two sentences, front-loaded with the core purpose, followed by essential parameter specifics. No filler words or redundant content. Perfectly concise for the complexity.

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 5-parameter tool with no output schema, the description explains the core concept and parameter roles well. It lacks concrete examples or edge-case guidance (e.g., what happens if the base column doesn't exist), but the conceptual model is sufficiently complete for an agent to understand when and how to invoke it.

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 high (80%), with only sessionId undocumented. The description adds conceptual meaning about how baseColumnOrTable and summarization interact, but this largely restates schema descriptions. It does not provide additional detail on format, defaults, or validation, so it meets baseline but no more.

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 defines a user-defined AGGREGATION, marking a column on a detail table as the aggregate of a base column/table. It includes the specific verb 'Define' and the resource, and explains the goal (transparently answer queries from the smaller table). This distinguishes it from sibling set_* tools.

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?

The description provides clear context: use this when you have a typically pre-aggregated detail table and want to map a column to a base column/table for query optimization. It does not explicitly name alternatives or exclusions, but the purpose is distinct enough from siblings.

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