Skip to main content
Glama

group_aggregate_multi

Aggregate data by multiple columns with multiple aggregation functions in one call, saving time and resources.

Instructions

GroupBy with multiple columns and multiple aggregation functions in one call. Much more efficient than calling group_aggregate repeatedly. Functions: mean, sum, count, min, max, median, std. Example: group_aggregate_multi(group_by=["CargoType"], aggregations={"Revenue": ["mean","sum","count"], "Weight": ["mean","median"]})

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
df_nameNo
group_byYes
aggregationsYes

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 responsibility for behavioral disclosure. It adds helpful context: the tool operates 'in one call', supports a defined set of aggregation functions (mean, sum, count, min, max, median, std), and provides a concrete example. However, it does not explain side effects (e.g., whether the original dataframe is modified or a new one returned), default behavior for df_name, memory/performance characteristics beyond a vague 'efficient', or how missing values are handled. This is a moderate disclosure but leaves significant gaps.

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 tight and front-loaded. The first sentence gives the purpose, the second explains when to use it, the third lists available functions, and the fourth provides a concrete example. Every sentence adds value, with no redundancy or filler. The example is compact and directly clarifies the two complex parameters, making the description efficient despite the additional lines.

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?

For a tool with a nested aggregations object and an output schema, the description provides a useful example and function list, covering the most complex aspects. However, it omits any reference to df_name semantics, which is a required context for selecting the target dataframe, and does not mention any prerequisites (e.g., columns must exist, numeric types needed for certain functions). The output schema covers return values, but the operational context is not fully complete for an agent without prior assumptions.

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 successfully illustrates the structure and semantics of group_by (list of column names) and aggregations (dict mapping columns to lists of function names), and it implicitly shows that df_name can be omitted via default. However, df_name is never explicitly explained, and there is no systematic description of parameter semantics. The example is helpful but incomplete, especially for an agent that might not infer the role of df_name from the schema alone.

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 opens with a clear, specific statement: 'GroupBy with multiple columns and multiple aggregation functions in one call.' This identifies the operation (group by) and key differentiating features (multiple columns and functions), and it distinguishes itself from the sibling tool group_aggregate by explicitly calling out efficiency gains. The function list and example reinforce what the tool does.

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 gives clear context for when to use this tool: when multiple columns and multiple aggregations are needed, and explicitly states it is more efficient than calling group_aggregate repeatedly, naming that as an alternative. However, it does not state when not to use it (e.g., for a single aggregation) or mention other alternatives like crosstab or describe_by_group, so it stops short of full exclusion 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/AstyanM/mcp-data-science'

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