Skip to main content
Glama

Anhang lesen

anhang_lesen
Read-onlyIdempotent

Liest den INHALT einer angehängten Datei - nicht nur ihren Namen. Damit kannst du mit einem Arbeitsauftrag, einer Musterlösung oder einem Handout wirklich arbeiten: zusammenfassen, Fragen beantworten, daraus eine Session bauen.

WAS GELESEN WERDEN KANN: DOCX (mit Überschriften und Tabellen), PPTX (Folie für Folie), XLSX (Tabellenblätter), PDF mit echtem Text, und alles Textbasierte (txt, md, csv, json, xml).

WAS NICHT GEHT: Ein GESCANNTES PDF enthält nur eine Fotografie von Text; daraus kommt nichts. Dasselbe gilt für Bilder. Du bekommst dann einen Hinweis statt eines leeren Textes - halte das Dokument also nicht für leer, sondern sag dem Nutzer, dass er eine Textfassung braucht.

Die Liste der Anhänge steht in session_lesen unter „anhaenge", je mit „id". Gib diese id an. Ein Dateiname geht auch, ist aber nicht eindeutig, wenn es ihn zweimal gibt.

Lange Dateien kommen stückweise: „zeichen_gesamt" sagt, wie lang der ganze Text ist, „gekuerzt" ob noch etwas fehlt. Mit „ab" liest du weiter.

Input Schema

NameRequiredDescriptionDefault
abNoAb welchem Zeichen weitergelesen wird (Vorgabe 0).
idYesDie ID der Session.
anhangYesDie „id" des Anhangs aus session_lesen - oder sein Dateiname.
max_zeichenNoWie viel auf einmal (Vorgabe 40000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

While annotations already cover the read-only/idempotent safety profile, the description adds substantial behavior the annotations do not: exactly which formats yield readable text, that scanned PDFs/images return a hint rather than empty text (and what the agent should tell the user), and how pagination works via zeichen_gesamt/gekuerzt/ab.

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

Conciseness5/5

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

Front-loaded with the core purpose, then cleanly sectioned into what can be read, what cannot, where the id comes from, and pagination. Despite its length, every section carries actionable information for a genuinely multi-faceted tool.

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?

Even without an output schema, the description discloses the relevant return fields (zeichen_gesamt, gekuerzt) and the error behavior for unreadable files. Combined with full schema coverage and annotations, an agent has everything needed to call it correctly.

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 baseline is 3. The description goes beyond the schema by explaining that 'anhang' should be the id from session_lesen (with the filename caveat about non-uniqueness) and by explaining how 'ab' is used to continue reading a long file.

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+resource (reads the CONTENT of an attached file) and immediately distinguishes itself from mere name listing. It is clearly separable from siblings like session_lesen (which lists attachments) and anhang_hinzufuegen (which adds them).

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?

Gives concrete when-to-use context (working with a work order, sample solution, or handout: summarize, answer questions, build a session) and a strong when-not section for scanned PDFs and images. It points to session_lesen for the attachment id rather than naming a true alternative tool for the same task, so it falls just short of full explicit routing.

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