Skip to main content
Glama

Generate commission statements

generate_commission_statements
Read-onlyIdempotent

Use this when the user wants commission statements for several reps, asks "how much commission did each rep earn this month", or attaches a deals export (CSV or Excel from a CRM or spreadsheet with rep, deal, amount, margin, close date, status columns; columns are matched automatically). Applies one plan to all reps (with per-rep quota, draw and prior balance overrides), handles split deals, SPIFFs, clawbacks, caps and draws, and returns a team summary, a commission statement PDF with one section per rep, and an Excel workbook listing each deal line. Does not compute taxes, withholding or take-home pay, and does not read PDF or image files. Do not use for a single quick commission question (use calculate_commission).

Input Schema

NameRequiredDescriptionDefault
fileNoThe deals export to read, CSV or Excel (.xlsx), e.g. september-deals.csv, with one deal per row.
planYesOne plan applied to all reps (per-rep quota, draw and balance go in rep_overrides), e.g. {"rate":8,"clawback_window_days":90}.
dealsNoTyped deals when there is no file, each with rep (or splits), e.g. [{"rep":"Ana","deal":"Acme","amount":30000},{"deal":"Globex","amount":20000,"splits":[{"rep":"Ana","percent":60},{"rep":"Ben","percent":40}]}].
currencyNoISO currency code, default USD, e.g. CAD or EUR.
rep_nameNoRep to credit when the file has no rep column, e.g. "Maria Lopez".
column_mapNoOnly if automatic matching picks the wrong column: file header per field, e.g. {"amount":"Net Revenue","rep":"Opportunity Owner"}.
period_endNoLast day of the period, e.g. 2026-09-30.
sheet_nameNoExcel sheet to read, e.g. "Closed Won". Default: the first sheet with an amount column.
company_nameNoCompany name printed on the statements, e.g. "Acme Corp".
period_labelNoLabel printed on statements, e.g. "September 2026" or "Q3 2026".
period_startNoFirst day of the commission period, e.g. 2026-09-01. Deals closed outside the period are not counted.
rep_overridesNoPer-rep quota, target variable, draw or prior balance, e.g. [{"rep":"Ana","quota":120000,"draw_amount":2000}].

Output Schema

NameRequiredDescriptionDefault
modeYes
repsYes
teamYes
notesYes
periodYes
sourceYes
currencyYes
downloadsYes
reps_totalYes
columns_usedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With annotations already declaring readOnly/idempotent/non-destructive, the description still adds substantial behavioral context: which pay elements are handled (splits, SPIFFs, clawbacks, caps, draws), what is explicitly out of scope, and which three output artifacts are produced. This is well beyond what the annotations convey.

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?

Information is front-loaded: usage triggers first, then returned artifacts, then exclusions and sibling routing. It is dense but each sentence carries weight; the only cost is that it reads as one long paragraph rather than being segmented.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex 12-parameter tool with nested plan/deal objects and an output schema, the description covers input formats, output artifacts, scope exclusions, and the correct sibling alternative. An agent has everything needed to decide and invoke correctly.

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 100%, so the schema already documents all 12 parameters in depth. The description adds only light supplemental meaning (automatic column matching, one plan with per-rep overrides), which is honest but not needed to compensate for any gap.

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 names a specific verb and resource (generate commission statements) and states the scope (several reps, one plan applied to all). It explicitly distinguishes itself from the sibling calculate_commission, so an agent can route without opening either schema.

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?

It gives concrete triggers (multiple reps, 'how much commission did each rep earn this month', attached deals export), names the alternative for a single quick question, and lists explicit exclusions (taxes, withholding, take-home pay, PDF/image files). Nothing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources