Skip to main content
Glama

Invoice data extraction

submit_invoice_data_extraction
Idempotent

Extract invoice number, date, total and VAT from invoice text and deliver a reconciliation CSV. When invoices arrive as text and need structuring for reconciliation. Do not choose this when the source is a PDF or scan, which needs OCR. Example requests: Extract the totals from these invoices. | Turn this invoice text into structured records. | Parse these invoices into a reconciliation file.

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": {
      "inputs": "<inputs>",
      "authorized_by": "<authorized_by>"
    },
    "name": "submit_invoice_data_extraction"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputsYes
quote_idNoThe quote_id returned by POST /v1/jobs. Required to authorize a priced capability; the service rejects a priced job that does not name the quote it issued.
authorized_byYesIdentifier of the human or agent authorizing this job.
accepted_priceNoThe amount accepted, exactly as quoted (for example "5.00" or 5). Checked against the stored quote, so a price that moved between quote and authorize is refused rather than silently absorbed. Optional, but sent to make the acceptance explicit.

Output Schema

NameRequiredDescriptionDefault
quoteNo
stateYes
job_idYes
artifactsNo
access_tokenNoPer-job credential. Present it as the X-Job-Token header to read the job or list it. Keep it; it is the only credential for this job.
verificationNoIndependent verification. verification.ok = false means the job failed, not a partial success.
capability_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true and destructiveHint=false, so the safety profile is covered. The description adds the output shape (reconciliation CSV) but says nothing about the job/authorization flow implied by the schema — quote_id, accepted_price and authorized_by — nor that submitting starts a priced job; that is the one behavioral trait left undisclosed.

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?

Purpose is front-loaded in the first sentence, followed by the when and the when-not condition, which is the right order for a routing decision. The three example requests restate the already-clear usage condition and are the only mildly expendable content.

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 an output schema present, the description need not explain return values, and the annotations carry the safety profile. The remaining gap is that a priced, quoted job submission is never signalled in prose, which matters for a four-parameter tool with a nested input object.

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 75% and the schema itself explains quote_id, accepted_price, authorized_by and the invoice field in detail. The description only echoes that the input is invoice text, adding no format, sizing or pricing semantics beyond what the structured fields already say, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Extract invoice number, date, total and VAT from invoice text') and names the concrete deliverable ('a reconciliation CSV'), so the agent knows exactly what this produces. It carves out the OCR/PDF case, though it does not differentiate against near neighbours such as submit_html_text_extraction or submit_metadata_extraction that also turn text into structured fields.

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 an explicit when ('When invoices arrive as text and need structuring for reconciliation'), an explicit when-not ('Do not choose this when the source is a PDF or scan, which needs OCR'), and three sample requests that anchor the routing decision. An agent has everything needed to pick this tool over the OCR path without opening a schema.

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