Skip to main content
Glama

Get parsed invoice result

get_result
Read-onlyIdempotent

Returns the result of a parse job started by parse_invoice: structured fields (supplier, invoice number, dates, net/VAT/gross, currency, line items) plus export links for accounting systems.

Use when: you already have a job_id and want its status or its extracted data. Do not use when: you have no job_id yet — start with parse_invoice. Do not poll in a tight loop: one call every few seconds is enough, text PDFs and XML usually finish in under a minute.

Side effects and cost: none. Does not touch the prepaid balance, so repeated polling is free; a failed job stays failed.

Parameter interactions and edge cases: job_id belongs to the key that created it, so a job started with one key is invisible to another. A pasted URL or a document id from another system returns 404 rather than a guess. A job that failed stays failed — polling it again will not resurrect it; start a new parse_invoice call instead.

Returns: {ok, result}, where result.status is queued, processing, done or failed; on done it also carries fields and export links.

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": {
      "job_id": "<job_id>"
    },
    "name": "get_result"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idYesJob identifier from the parse_invoice response, for example "2507". Scoped to the API key that created it: another key gets 404. Accepts the numeric id, not a URL.
api_keyNoDueBuddy API key (starts with dd_). Omit it when the server was added with an X-Api-Key header or DUEBUDDY_API_KEY is set. Must be the same key that started the job.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / api_key / description
      Added value: +"DueBuddy API key (starts with dd_). Omit it when the server was added with an X-Api-Key header or DUEBUDDY_API_KEY is set. Must be the same key that started the job."
    • addedInput schema / properties / job_id / description
      Added value: +"Job identifier from the parse_invoice response, for example \"2507\". Scoped to the API key that created it: another key gets 404. Accepts the numeric id, not a URL."
  2. Changed2 schema fields changed
    • addedInput schema / properties / api_key / default
      Added value: +""
    • changedInput schema / required
      Previous value: -[
      -  "api_key",
      -  "job_id"
      -]New value: +[
      +  "job_id"
      +]
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, but the description adds real context beyond them: no prepaid-balance cost, failed jobs stay failed and cannot be resurrected by polling, and jobs are invisible across API keys. The 404-on-foreign-id behavior is also disclosed. It stops short of describing pagination or result size limits, which keeps it out of the top band.

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?

Labeled sections (Use when / Do not use when / Side effects / Parameter interactions / Returns) make it scannable and front-load the core purpose. It is on the longer side and the key-scoping point recurs in both the prose and the Returns section, but every block carries usable information.

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?

With no output schema, the description supplies the return envelope ({ok, result}) and enumerates the four status values plus what appears on done. Combined with the polling, cost, and failure semantics, an agent has everything needed to call it correctly and interpret the response.

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 100% and the schema already documents that job_id is key-scoped, accepts a numeric id, and rejects URLs. The description largely restates these (key scoping, 404 for pasted URL or foreign document id), adding only the practical consequence of the 404 rather than new parameter meaning.

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 ("Returns the result of a parse job") and immediately names the originating sibling parse_invoice plus the concrete payload (structured fields and export links). An agent can distinguish this from parse_invoice and the balance/topup siblings without opening a schema.

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 "Use when" (you already have a job_id) and "Do not use when" (no job_id yet — start with parse_invoice), plus actionable polling cadence guidance and expected latency for text PDFs and XML. Alternatives and exclusions are both named.

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.