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
| Name | Required | Description | Default |
|---|---|---|---|
| sheet | Yes | ||
| operation | Yes | ||
| value_col | Yes | ||
| conditions | No | ||
| folder_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||