Skip to main content
Glama
mcp-server-chile
by crisvd

Check invoice totals

check_invoice_totals
Read-onlyIdempotent

Verifies Chilean invoice totals: checks IVA equals 19% of net (±1 peso rounding) and that net + exempt + IVA match the total, returning any inconsistencies.

Instructions

Verifies that IVA is 19% of the net amount (±1 peso rounding) and that net + exempt + IVA equals the total. Returns the list of problems; consistent=false is a normal result.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "neto": "<neto>",
      "iva": "<iva>",
      "total": "<total>"
    },
    "name": "check_invoice_totals"
  }
}

Input Schema

NameRequiredDescriptionDefault
ivaYes
netoYes
totalYes
exentoNo

Output Schema

NameRequiredDescriptionDefault
problemsYes
consistentYes
expected_ivaNo
expected_totalNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish that this is a read-only, idempotent, non-destructive check. The description adds useful behavioral detail beyond that: the exact tolerance (±1 peso rounding), the arithmetic relationships checked, and the fact that failures are returned as a list of problems rather than treated as errors.

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

Conciseness5/5

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

Two compact sentences with no wasted wording. The verification rules are front-loaded, followed by the key behavioral note about consistent=false.

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?

An output schema exists, so return values need not be re-explained. The description covers the core validation rules and the normal-failure behavior. It could be slightly more complete by clarifying amount units or the meaning of the optional exento parameter.

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?

Schema coverage is 0%, so the description must carry parameter meaning. It explains how neto, exento, IVA, and total relate, including that exento is added alongside neto and IVA. It does not explicitly state units or that amounts are integer pesos, so there is a small remaining 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 gives a specific verification task: checks that IVA equals 19% of neto within ±1 peso and that neto + exento + IVA equals total. This clearly distinguishes it from a calculation sibling such as calculate_iva, which would compute rather than verify.

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

Usage Guidelines3/5

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

The description implies the tool is for validating an already-computed invoice breakdown, and notes that consistent=false is a normal result. It does not explicitly state when to use this instead of calculate_iva or another validation path, so the guidance remains implicit.

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