Skip to main content
Glama

ERP: Sales report (period, client, product)

erp_sales_report
Read-only

What the company SOLD over a period, from the ERP: revenue, number of sales, units, average check, margin (by each item's current cost, when the catalog has it), month by month, top clients and top products. Counts sales orders (the web shop's, the cabinet's and those recorded in this chat; not drafts, not cancelled) and sales invoices without an order. Answers «скільки продав за жовтень», «порівняй жовтень і листопад» (since=2026-10-01, until=2026-11-30 → by_month), «що купувала Спирова» (client → her sales one by one with items), «скільки продали B12 за місяць» (item → units, revenue, buyers), «топ товарів / клієнтів», «маржа». Dates: 'since' / 'until' YYYY-MM-DD or YYYY-MM (a whole month); default this month to today. Read-only; say the numbers exactly as returned with the period. For the till of a retail shop (POS receipts) and for a retail chain's points / shops / «відділи» (their daily reports) use retail_sales_summary instead.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "erp_sales_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNo
itemNoOne product (name words, number or barcode).
sinceNo
untilNo
clientNoA client's name: their sales, one by one.
group_byNo
list_salesNoAlso list the sales one by one (newest first).
all_matchesNoThe client name matches several cards: take all.
organization_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint true, destructiveHint false, openWorldHint false), and the description adds real behavioral context beyond them: which order sources are counted, that drafts and cancelled orders are excluded, that margin depends on the catalog having a current cost, and the reporting caveat to quote numbers exactly with the period. It stops short of stating currency, tax treatment or pagination/limits on large periods.

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?

Front-loaded with the outcome first, then data scope, then concrete question→parameter mappings, then the exclusion. It is dense and slightly run-on with mixed-language examples, but each clause contributes usable routing or parameter information rather than filler.

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?

With nine optional parameters, no output schema and no required fields, the description does enough: it defines the report's dimensions, the date semantics, and how to steer by client or item. The remaining gap is the opaque organization_id and the exact response shape, though the examples imply it (by_month, per-client sale lists).

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 only 44%, so the description has to carry weight, and it does for some parameters: since/until accept YYYY-MM-DD or YYYY-MM with a documented default of this month to today, and item/client are given semantic meaning (units, revenue, buyers; sales one by one with items), plus by_month behaviour. But top, list_sales, all_matches and especially organization_id get no explanation in either schema or description.

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?

States a specific verb and resource ("What the company SOLD over a period, from the ERP") and enumerates the exact metrics returned: revenue, sales count, units, average check, margin, monthly breakdown, top clients/products. It also delimits the data scope (sales orders from web shop, cabinet and chat; not drafts, not cancelled; sales invoices without an order), so an agent can distinguish it from retail_sales_summary by data source.

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?

Explicitly maps real user questions (Ukrainian examples) to the parameter combination that answers them — «порівняй жовтень і листопад» → since/until + by_month, «що купувала Спирова» → client, «скільки продали B12» → item. It also names an exclusion with the alternative: POS/retail-chain daily reports must go to retail_sales_summary instead.

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