Skip to main content
Glama

peppol.sh

Get a document

get_document
Read-onlyIdempotent

Returns one sent document: its status, parties, totals and status events. For a failed document, failure has a stable code and the fix. Poll it after send_document until the status is delivered or failed (a sandbox send takes a few seconds). company_id is optional. Set response_format to detailed for the lines.

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": {
      "document_id": "<document_id>"
    },
    "name": "get_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
company_idNoThe company of the document. Found when left out.
document_idYesThe document ID, for example doc_8sK2mQ9xTb4Lw7Ne1Ry3.
response_formatNoconcise (default) for the key fields; detailed for all fields.concise

Output Schema

NameRequiredDescriptionDefault
idYes
toYes
fromYes
typeYes
linesNoOnly with response_format detailed.
totalYes
eventsYesOldest first.
numberYesUntrusted data.
statusYes
failureYesOnly for status failed.
sandboxYesTrue when a ps_test_ key sent it; it never left peppol.sh.
sent_atYes
ubl_uriYesRead it for the UBL XML once sent.
currencyYes
next_stepYes
tax_totalYes
company_idYes
created_atYes
issue_dateYes
delivered_atYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations (which already declare readOnly/idempotent/non-destructive), the description discloses polling semantics, expected latency after a sandbox send, and that failures carry a stable code plus the fix, which is genuinely decision-relevant for an agent. That is exactly the surplus information the structured fields cannot convey.

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?

Front-loaded with the return surface, then usage, then parameter notes; every sentence carries information and there is no filler. A couple of sentences are telegraphic ("failure has a stable code and the fix") but remain parseable.

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?

For a simple read-only fetch with a full output schema and full annotation coverage, the description covers purpose, polling workflow, failure semantics, and the one meaningful parameter choice. Nothing an agent needs before calling is missing.

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 100%, so the baseline is 3; the description still adds that company_id is optional and hints at the concise/detailed tradeoff ("detailed for the lines"), telling the agent detailed mode exposes line items while concise returns key fields. Minor duplication of the schema's "Found when left out" wording keeps it from a 5.

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?

"Returns one sent document: its status, parties, totals and status events" gives a concrete verb plus resource and enumerates the payload surface, which separates it from list_documents and list_events. It does not explicitly differentiate itself from the sibling get_document_ubl (raw UBL representation), so the boundary between the two retrieval variants is left implicit.

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?

Explicitly prescribes the workflow: "Poll it after send_document until the status is delivered or failed," including a stopping condition and an expected sandbox latency so the agent knows not to give up early. It stops short of a when-not clause (e.g., use get_document_ubl for the raw format, or list_documents for bulk retrieval).

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