Skip to main content
Glama

Get document file

get_document_file
Read-onlyIdempotent

Hand back the stored file of a document — a signed download link, valid for one hour. WHY IT EXISTS: create_invoice_upload_url only puts files IN. Once a Beleg was booked there was no way to read it again: to check a payment term, a bank detail or what was actually invoiced, the PDF had to be hunted down in the mailbox it came from, which fails as soon as the mail was filed or the file came from a portal. Measured on 22.11.2026 on the NetBiz invoice — the mail was no longer findable and the stored PDF was unreachable. READ-ONLY: it signs a link, it changes nothing about the document. The link carries the file itself, so treat it like the file — it needs no further login.

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_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
document_idYesThe Book-AI-ze document whose stored file is wanted.
valid_secondsNoHow long the link stays valid, 60 to 3600 seconds. Default 3600.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false, so safety is covered. The description still earns credit by disclosing behavior annotations cannot express: the result is a link valid for one hour, it embeds the file itself, and it needs no further login, which tells the agent it is handling a bearer-style URL that should not be broadly shared. It says nothing about what happens when a document has no stored file, which keeps this short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The lead sentence is well front-loaded and the CAPS section labels make the rationale scannable. However, the NetBiz invoice anecdote with the 22.11.2026 measurement date is narrative garnish that does not help an agent decide or invoke; the same motivation would land in one clause. Two sentences of the block could be compressed without losing routing value.

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 must explain the return value, and it does: a signed download link carrying the file, valid one hour. Read-only semantics and the authentication posture of the link are both covered. What is missing is failure behavior — for example, when a document exists but has no stored file — which matters for a tool whose whole purpose is retrieving physical artifacts.

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%, so both document_id and valid_seconds are already documented and the baseline is 3. The description adds only marginal meaning — that the returned link's one-hour lifetime corresponds to the default valid_seconds, and that document_id refers to the stored file rather than the document record — which is useful framing but no new parameter mechanics.

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?

The opening sentence names a specific verb and resource: 'Hand back the stored file of a document — a signed download link.' It also makes the output shape explicit, a signed URL rather than the document metadata itself, which is exactly what distinguishes it from get_document or get_document_source without opening either schema.

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?

It gives concrete conditions for use — checking a payment term, a bank detail, or what was actually invoiced — and explicitly contrasts the tool with create_invoice_upload_url, which 'only puts files IN.' The gap is that it never states the converse routing rule (use get_document when only metadata is wanted), so an agent must infer that from sibling names.

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