Skip to main content
Glama

aggregate_data

Read-only

Groups rows by selected columns in an Excel sheet and aggregates values using operations such as sum, mean, or count.

Instructions

Group rows by column(s) and aggregate values using the specified operation.

Args: file_path: Workbook path. sheet_name: Worksheet name. group_by: Column or list of columns to group by. value_column: Column to aggregate. operation: Aggregation operation (e.g. 'sum', 'mean', 'count'). has_header: Whether the sheet has a header row. aggfunc: Optional pandas-style aggfunc or mapping.

Returns: dict: Aggregated results (may be written to sheet if underlying tool provides an option).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aggfuncNo
group_byYes
file_pathYes
operationNosum
has_headerNo
sheet_nameYes
value_columnYes
Behavior1/5

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

The annotation readOnlyHint=true indicates the tool is read-only, but the description states 'may be written to sheet if underlying tool provides an option,' which suggests a possible write side effect. This contradicts the annotation, so it must be scored 1.

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 purpose is stated in one sentence, followed by a well-structured parameter list and return description. No unnecessary words or repetition; every sentence adds useful information.

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?

All parameters are covered and the return type is mentioned, but the return description is vague ('Aggregated results') and there is no detail on error handling, edge cases, or detailed output format. The ambiguous write statement also reduces completeness. For a tool with no output schema, more specificity is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description provides definitions for all seven parameters in the Args section, including examples for operation and a note on aggfunc. This fully compensates for the lack of schema descriptions.

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: 'Group rows by column(s) and aggregate values using the specified operation.' This provides a specific verb and resource. However, it does not explicitly differentiate from sibling tools like create_pivot_table or column_statistics, which also aggregate data.

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 core statement implies the use case for grouping rows and aggregating, but there is no explicit guidance on when to prefer this tool over alternatives, nor any exclusions or prerequisites. The context is clear but not comprehensive.

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/mbeps/excel-mcp'

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