Skip to main content
Glama

Get Document Attachment

dokument_anhang_get
Read-only

Eine Originaldatei holen (GET /dokumente/{slug}/anhaenge/{id}).

`vorschau=True` liefert bei einem BILD die kleine WebP-Fassung (längste Seite 256) statt des Bildes -- genug, um zu sehen, was es ist,
ohne dass das ganze Bild in deinen Kontext kommt. Bei einem Anhang ohne Vorschau (kein Bild) ist das ein Fehler (404), kein stilles Original.

Bis 1 MB kommt der Inhalt als `inhalt_base64` mit. Ist die Datei größer,
kommt `inhalt_base64: null` und ein `hinweis` -- 20 MB Base64 in einer
Werkzeug-Antwort wären keine Auskunft, sondern verbrauchten deinen
Kontext. Den lesbaren Text zum Beleg liefert `dokument_get`; das Original
ist für Menschen und für Werkzeuge mit Dateizugriff (REST-Weg
`GET /dokumente/{slug}/anhaenge/{id}`, derselbe `X-Compass-Key`).

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": {
      "slug": "<slug>",
      "anhang_id": "<anhang_id>"
    },
    "name": "dokument_anhang_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatNoChat token returned by `persona_waehlen`. With it, the call acts as the persona of that chat; without it, as the unbound connection (Chat-Token aus `persona_waehlen`: mit ihm handelt der Aufruf als die Persona dieses Chats, ohne ihn als die ungebundene Verbindung).
slugYes
vorschauNo
anhang_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the readOnlyHint/destructiveHint annotations: it discloses the 1 MB inline threshold, that larger files return inhalt_base64: null plus a hinweis rather than blowing up context, that vorschau on a non-image is a hard 404 rather than a silent fallback, and the auth model (X-Compass-Key on the REST path). That is exactly the operational context annotations cannot carry.

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 action and the endpoint, then ordered by what matters (preview behavior, size cap, fallback). The rhetorical aside about 20 MB of base64 earns its place as justification, but the repeated REST path at the end is slight redundancy.

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?

An output schema exists, yet the description still flags the two return values an agent must branch on (inhalt_base64 populated vs null plus hinweis) and the error case. Combined with size limits and auth notes, nothing needed to call this correctly 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 only 25% (only chat is documented in-schema), but the description compensates on the risky parameter: vorschau is explained with default behavior, output format (WebP, longest side 256) and its 404 failure mode. slug and anhang_id are only implied through the URL template, which is why this is not a 5.

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?

Names a specific verb and resource ('Eine Originaldatei holen') and pins it to the REST path GET /dokumente/{slug}/anhaenge/{id}. It also draws the line against the sibling that could be confused with it: readable text comes from dokument_get, the original file comes from here.

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?

The definition routes the agent explicitly to dokument_get for readable text and reserves this tool for original files, and it explains when vorschau=True is the right call (images you only need to identify). It stops short of stating exclusions against the other attachment siblings, so it is clear but not a full decision tree.

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.