Skip to main content
Glama

cross_file_aggregate

Aggregate totals across multiple Excel files. Fetches matching sheets from all files in parallel, applies filter conditions, and returns the combined sum, count, or average.

Instructions

MANDATORY for any total spanning more than one file. Fetches relevant sheets from ALL files in PARALLEL, applies filter conditions, returns the aggregate total.

WHEN YOU MUST CALL THIS:

  • Any total, sum, count, or average across multiple files

  • Any cross-file comparison or consolidation

  • Verifying a total you calculated from individual files

NEVER calculate cross-file totals by:

  • Adding individual filter_sheet results in your head

  • Using Python to sum numbers from separate tool calls

  • Guessing based on partial data

Always call this AND show per-file breakdown so the user can verify both agree. If they differ, flag it.

ONLY files whose sheet is named EXACTLY sheet are included in the total. Files without that exact sheet are listed in unmatched_files, with their actual sheet names and did_you_mean candidates — they are NEVER silently included. If the response has a warning, skipped_files, or unmatched_files, surface that to the user: the total may be incomplete. Check sheet_name_variants in get_workspace_graph first to see naming fragmentation before aggregating.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sheetYes
operationYes
value_colYes
conditionsNo
folder_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Given no annotations, the description discloses key behaviors: parallel fetching, exact sheet-name matching, listing unmatched files with did_you_mean candidates, and never silently including them. It also warns that warning/skipped_files/unmatched_files indicate incomplete totals and mandates surfacing them to the user. It does not explicitly state read-only nature, but there are no mutations implied.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is longer than average but well-structured with bolded headings and lists, making it scannable. Each sentence carries actionable guidance, though some redundancy exists (e.g., repeated emphasis on showing per-file breakdown). Overall, it earns its length without being bloated.

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 tool has an output schema, so return values need not be described, yet the description references response fields (unmatched_files, skipped_files, warning) for error handling and gives a cross-tool prerequisite. It does not explain all parameters or link to filter_sheet's conditions structure, but it is highly comprehensive for a complex tool.

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 0%, so the description must compensate. It clarifies that `sheet` must match exactly and mentions 'filter conditions' conceptually, but it does not explain `value_col`, `operation` options, `conditions` structure, or `folder_path`. It adds some semantic context beyond the bare schema but leaves significant parameter gaps.

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 'MANDATORY for any total spanning more than one file' and explicitly states it fetches sheets from all files, applies filter conditions, and returns the aggregate total. It distinguishes from siblings like filter_sheet and aggregate by contrasting its cross-file scope with single-file alternatives.

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

Usage Guidelines5/5

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

Provides an explicit 'WHEN YOU MUST CALL THIS' list (any cross-file total/sum/count/average, cross-file comparison, verifying totals) and a 'NEVER calculate' list (adding filter_sheet results, Python summing, guessing). It also instructs to check sheet_name_variants in get_workspace_graph first, naming a prerequisite tool.

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/Karunya-Muddana/ExcelMCP'

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