Skip to main content
Glama

Xonta Customs RU

parse_invoice

Read-onlyIdempotent

Parse a supplier's commercial invoice or packing list into customs-ready line items.

Extracts invoice number, date, parties, currency, Incoterms and country of origin, and for each
line: description, model, material, supplier HS code, quantity, unit, price, amount, net and
gross weight. Checks arithmetic (qty x price, sum vs total), explains what to add to the invoice
value for customs value under the given Incoterms, and suggests a TN VED search query per line
(HS code first 6 digits or Russian keywords). Feed the lines to tnved_search and calc_import_payments.

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": "parse_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_urlNoPublic link to the invoice file: .xlsx/.csv are parsed directly; PDF/scans/DOCX go through DocParse when the server has it configured
invoice_textNoInvoice or packing list as Markdown or plain text, e.g. the output of DocParse. Tables with English, Chinese (品名, 数量, 单价, 金额, 净重) or Russian headers

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered; the description adds value by disclosing the derived behaviors an agent could not guess — arithmetic checks (qty x price, sum vs total), a customs-value adjustment explanation tied to the given Incoterms, and a per-line TN VED query suggestion. It is silent on failure behavior when the file is unparseable, which is the main remaining gap.

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?

The opening sentence front-loads the purpose and the closing sentence front-loads the handoff, which is good structure. The middle field-enumeration sentence is dense but every item listed is a concrete extraction target, so it earns its length; slight trimming would still help.

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 no output schema, the description carries the burden of describing returns, and it does so by enumerating header fields, per-line fields, and the three derived outputs (arithmetic validation, customs-value guidance, TN VED query). Enough is present to call the tool correctly, though the shape of the returned line items is not spelled out structurally.

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 description coverage is 100% and both parameters are already fully documented, including the file-vs-text split and supported header languages. The description restates the field inventory but adds no new semantics about the inputs themselves, so the baseline of 3 applies.

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?

Names a specific verb and resource ('Parse a supplier's commercial invoice or packing list') and states the output ('customs-ready line items'), then enumerates exactly which fields are produced. An agent can distinguish this from tnved_search or calc_import_payments because the description explicitly frames this tool as the upstream step that feeds them.

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

Usage Guidelines4/5

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

The closing line 'Feed the lines to tnved_search and calc_import_payments' tells the agent where this tool fits in the workflow, which is real routing guidance. It does not state exclusions or prerequisites (e.g., what to do if neither file_url nor invoice_text is supplied), so it stops short of the when-not guidance a 5 requires.

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.