Skip to main content
Glama

ERP: Record a shop's day report from a photo

erp_day_report
Destructive

A PHOTO of a shop's handwritten DAILY SALES REPORT («Щоденний звіт продажів»: date, department, seller, a table of rows — scent code, ml, bottle, colour, sum in [brackets] = card / without = cash, note UDS / −15 %; Каса, Безготівка, Залишок, testers) → the day's sales in the ERP in ONE card. Use it whenever the person sends or mentions such a photo and asks to read / check / record it («запиши звіт», «розбери звіт», «глянь звіт продажів», «запиши продажі з фото»). The server reads the photo itself, cell by cell (never say a handwriting is unreadable; never retype the rows yourself), checks the money, finds the department, the seller and every item in the cabinet, and the card asks what is open with buttons. Call with NO arguments for the latest photo; 'capture_id' for another. The person's corrections («рядок 4 — 606а», «9 і 10 разом», «відділ Сріблястий», «тестери по 5 мл») → call again with 'rows' / 'department' / 'seller' / 'tester_quantity' (the new card replaces the old one). 'read_again': true only when the person says the reading is wrong all over. A day already recorded for that department is refused — tell the person, never record it twice. Proposed write — «Записати» writes the card sales (paid by card) and the cash sales as two ERP sales from the department's warehouse and writes the testers off. CONFIRMATION: this tool is PROPOSED, never performed directly. You get status='confirmation_required' with an action_id and a plan_token, and the write happens only after confirm_action.

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_day_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoYYYY-MM-DD only to correct the sheet's date.
rowsNo
againNoOnly when the person confirms a SECOND report of the same department and day is not a duplicate.
sellerNo
capture_idNoThe photo (intake capture id); default the latest own photo.
card_totalNoCorrect «Безготівка» if misread.
departmentNoThe department / shop as the person names it, or a warehouse id.
read_againNo
cash_registerNoCorrect «Каса» if misread.
accept_mismatchNoThe person said to record it although the money does not add up.
tester_quantityNoHow much to write off per tester, in the scent's unit (ml); 0 = none.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description goes well beyond them: the server reads the photo itself cell by cell, the agent must never claim handwriting is unreadable or retype rows, money is checked, department/seller/items are resolved, and the resulting card is interactive with buttons. Crucially it discloses that this is a PROPOSED write returning status='confirmation_required' with action_id and plan_token, and that a day already recorded for a department is refused — none of which 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?

Front-loaded with the core purpose and trigger phrases, and every sentence carries operational information. It is a dense run-on block mixing English and Ukrainian, and the correction/confirmation material could be split for easier scanning, which keeps it from a 5.

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?

Complete for a complex 11-parameter mutation with no output schema: the confirmation handshake, the duplicate-refusal path, the correction loop, and the reading behavior are all covered. An agent has everything needed to decide to call it, pass the right correction parameters, and correctly explain the confirmation step to the user.

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

Parameters4/5

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

With 11 parameters at 73% schema coverage, the description adds meaningful semantics for the ambiguous ones: capture_id defaults to the latest own photo, the correction parameters are tied to specific kinds of user utterances, and tester_quantity is explained as a write-off quantity. It leaves date, card_total, cash_register and accept_mismatch to the schema, which documents them adequately, so a 4 rather than 5.

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: reads a photo of a shop's handwritten daily sales report and creates the day's sales in the ERP as one card. The document's structure (date, department, seller, rows of scent code/ml/bottle/colour/sum with bracket = card) is spelled out, so the agent knows exactly what input this tool consumes — clearly distinct from erp_record_sale or erp_product_photo.

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?

Explicit trigger conditions with quoted user phrases («запиши звіт», «розбери звіт», «запиши продажі з фото») plus the rule for corrections (re-call with rows/department/seller/tester_quantity), the narrow condition for read_again, and the duplicate-refusal path. It also routes the actual write to confirm_action, giving a clear boundary against the sibling that performs writes.

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