Skip to main content
Glama

Create Attachment Upload Address

dokument_anhang_adresse
Destructive

Eine EINMALIGE Upload-Adresse für eine Datei an ein Dokument holen (POST /dokumente/{slug}/anhaenge/upload-adresse) -- für Agenten OHNE Shell-Zugriff auf den MCP-Server und für alles, was zu groß ist, um durch dein Gespräch zu gehen.

WARUM: `dokument_anhang_put` verlangt die Bytes als `inhalt_base64` (durch den Kontext des Aufrufers) oder einen Pfad auf dem MCP-Server. Dieses Verb liefert
stattdessen eine Adresse und einen Token; die Antwort enthält einen fertigen `curl`-Befehl für den Upload, und die Datei geht direkt zum Server, ohne je durch den Kontext zu laufen:

    curl -sS -X POST -H 'X-Compass-Upload: <token>' -F 'datei=@/pfad/zur/datei.png' <adresse>

Die Antwort nennt `adresse`, `kopfzeile`, `token` und einen fertigen `befehl` (nur noch den Pfad einsetzen). Antwort des Uploads: dieselbe wie bei
`dokument_anhang_put` (id, medientyp, byte_groesse, ... bei Bildern breite, höhe, hat_vorschau).

DIE ADRESSE GILT FUER GENAU DIESES DOKUMENT, EINMAL und nur kurz (`gueltig_minuten`, Standard 10, höchstens 60): ein zweiter Upload mit demselben
Token, ein abgelaufener oder ein erfundener Token wird mit 403 abgewiesen (`zustand`: benutzt, abgelaufen, unbekannt). Scheitert der Upload selbst (kein
erlaubtes Format, Dokument inzwischen beendet), bleibt der Token benutzbar -- verbraucht ist er erst von einem gespeicherten Anhang. Der Token steht NUR
in dieser Antwort: er ist ein Geheimnis und gehört nicht in Dokumente, Gedächtnis oder Nachrichten und wird nicht weitergegeben.

`als`: `dazulegen` (Standard) oder `neue_fassung`, wie bei `dokument_anhang_put` (z. B. Prüfung 2025 und 2026 nebeneinander ablegen oder die neue Fassung).
`groesse_max` (Byte) darf die Grenze von 25 MB nur SENKEN. Bilder (png, jpeg, webp) laufen unabhängig davon durch die Grenze des Bildwegs (4 MB, 16
Megapixel, Breite höchstens 2560, neu kodiert ohne EXIF).

Das Dokument muss es geben und es darf nicht beendet sein. Hat der Betreiber keine öffentliche Adresse eingerichtet (`COMPASS_PUBLIC_WEB_URL`), gibt
der Kern keine aus (503) -- dann bleibt `dokument_anhang_put`.

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>"
    },
    "name": "dokument_anhang_adresse"
  }
}

Input Schema

NameRequiredDescriptionDefault
alsNodazulegen
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
groesse_maxNo
gueltig_minutenNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes far beyond the annotations: one-time single-document scope, TTL default 10 / max 60 minutes, 403 with zustand values (benutzt, abgelaufen, unbekannt) on reuse or expiry, the rule that a failed upload leaves the token usable and it is only consumed by a stored attachment, plus the warning that the token is a secret that must not be written into documents or memory. It also discloses hard limits (25 MB ceiling that can only be lowered; image path capped at 4 MB / 16 MP / 2560 px with EXIF stripping) and the precondition that the document exists and is not ended.

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 purpose, then a WARUM section, then constraints, with a code block for the curl command — every section carries information. It is nonetheless long and prose-dense, with some detail (image re-encoding specifics, response field enumeration) that the output schema already covers.

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 tool that mints a one-time secret token and gates on server configuration, the definition covers preconditions, failure modes, TTL, size limits and the fallback path. Since an output schema exists, the description's mention of adresse/kopfzeile/token/befehl is a bonus rather than a gap-filler.

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 20% (only chat is documented in the schema), and the description compensates for most of it: als is explained with its two values and a concrete use case, groesse_max is stated to be bytes and to only lower the 25 MB limit, gueltig_minuten gets default and upper bound. The required slug is only inferable from the endpoint path rather than defined, so it is not quite complete.

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 ('Eine EINMALIGE Upload-Adresse für eine Datei an ein Dokument holen') plus the underlying endpoint POST /dokumente/{slug}/anhaenge/upload-adresse. It explicitly contrasts itself with the sibling dokument_anhang_put, so an agent can pick between them 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 Guidelines5/5

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

Gives an explicit when-to-use clause ('für Agenten OHNE Shell-Zugriff ... und für alles, was zu groß ist, um durch dein Gespräch zu gehen') and an explicit when-not/fallback: if COMPASS_PUBLIC_WEB_URL is unset the core answers 503 and 'dann bleibt dokument_anhang_put'. The alternative and the condition that selects it 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.