Skip to main content
Glama

Extraction Invoice

po_extraction_invoice

WRITES DATA. Creates or changes data in the workspace. Extract invoice fields from a document (starts a job). May reach systems outside PaperOffice.

Input Schema

NameRequiredDescriptionDefault
modelNoAI processing tier (flat pricing). Basic=OCR+Vision, Premium=+AI Thinking, Ultra=+AI Reasoning. per/per-Max variants add higher page limits.premium
pofidNoPaperOffice File ID of an existing document in the DMS. Alternative to upload_id/file_url — exactly one file input is required.
file_urlNoDirect URL to download the file from. Alternative to upload_id/pofid — exactly one file input is required.
priorityNoLEGACY queue weight (numeric). Prefer processing_lane (Start-SLA). If processing_lane is set, the lane wins. Do not use as the public SLA product.
upload_idNoUpload ID from po_documents_upload_url_get (preferred file input method). Exactly one file input is required: upload_id, file_url or pofid.
async_onlyNoForce async: same as client_wait=false. Returns job_id immediately; poll GET /job/get/{job_id}.
idp_fieldsNoOPTIONAL: Additional fields as JSON, e.g., {"key":"has_stamp","description":"Is there a stamp?"}
client_waitNoConnection hold: true (default) = API holds this HTTP request while the job runs, up to the dynamic pipeline timeout (priority, pages, pipeline type; minimum about 20s, infrastructure cap about 295s). Returns the finished result when ready, or HTTP 202 with job_id and poll_url if the hold is exceeded. false = immediate job_id.
idp_collectionNoIDP template name. Default: invoice (English). For localized versions use the dedicated tools (e.g. the German/DATEV-optimized extraction profile in Document AI). Advanced: append :lang:LOCALE for custom localization e.g. invoice:fr:FRinvoice
idempotency_keyNoOPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).
processing_laneNoStart-SLA lane (wait-to-start guarantee, not completion). Values: no_sla (fair use ×1), sla_24h (×1.5), sla_12h (×2), sla_6h (×3), sla_1h (×4), instant (×5 interactive start). Prefer this over legacy numeric priority. If omitted: workspace default_processing_lane, else no_sla.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed1 schema field changed
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "description": "OPTIONAL: Idempotency key (8-128 visible ASCII characters). Also accepted as header Idempotency-Key or X-Idempotency-Key. Repeating the identical request with the same key within 24 hours returns the stored result (idempotent_replay: true) without processing or charging again. Same key with a different request: 409 IDEMPOTENCY_CONFLICT. Original still running: 409 IDEMPOTENCY_IN_PROGRESS. Original processed but result not stored: 409 IDEMPOTENCY_UNKNOWN. Idempotency store unavailable: 503 IDEMPOTENCY_UNAVAILABLE (retry with the same key).",
      +  "type": "string"
      +}
  4. First observed

TDQS

B3.2/5.0
Behavior3/5

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

The 'WRITES DATA' and 'May reach systems outside PaperOffice' lines align with and reinforce the annotations (readOnlyHint=false, openWorldHint=true) rather than contradicting them. The 'starts a job' note adds genuine behavioral context beyond annotations, but the description is silent on cost/credit implications, timeouts, and how the finished result is retrieved, which matter for an expensive AI extraction.

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?

Three short sentences, with the mutation warning front-loaded before the actual action. 'WRITES DATA. Creates or changes data in the workspace.' is slightly redundant but serves as a safety flag rather than filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter, job-based, open-world extraction tool with no output schema, the description covers the essentials (what it does, that it mutates, that it spawns a job) but omits result retrieval and the default invoice template behavior. The 100% schema coverage compensates for most parameter gaps, leaving it adequate but not complete.

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%, with rich enum docs for model and processing_lane, so the baseline is 3. The description adds nothing about model tiers, lanes, idempotency, or the anyOf file-input constraint — all of that is carried entirely by the schema.

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 fields from a document') and adds that a job is started, which no sibling name conveys. It does not explicitly contrast with sibling tools like po_documents_text_get or po_job_get, but the extraction purpose is unmistakable.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no mention of when to prefer this over po_documents_text_get, and no note that exactly one file input must be chosen (that lives only in the schema). The 'starts a job' phrasing hints at polling but never names po_job_get as the follow-up, leaving the agent to infer it.

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