Skip to main content
Glama

aleph_fetch_document_text

Read-only

Fetch a document entity's extracted text by ID to quote or verify its exact wording, supporting PDFs, emails, articles, and similar items from search results.

Instructions

Read the extracted text of a document entity (PDF page, email, article) so you can quote or verify what it actually says. Pass the entity ID of a Document, Pages, Email or similar entity from a search result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_idYesEntity ID of the document.
max_charsNoTruncate the text at this many characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, openWorldHint, and destructiveHint=false, and the description's 'Read' matches. It adds that the tool returns extracted text rather than metadata, but it doesn't say whether output is a raw string, how max_chars affects the result, or what happens when no text is extracted. No contradiction with annotations.

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?

Two sentences, no filler. The core purpose is front-loaded, and the usage note is second. Every clause earns its place.

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?

For a read-only tool with two well-documented params and no output schema, the description gives the agent what it needs: what it does, what input to pass, and why to use it. A minor gap is not spelling out the return shape or truncation effect, but the schema already documents max_chars.

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?

The schema covers both parameters fully (100%), but the description adds semantic context for entity_id: it must be a Document, Pages, Email or similar entity from a search result. That is useful beyond the schema's generic 'Entity ID of the document.'

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 description opens with a specific verb ('Read') and resource ('extracted text of a document entity'), enumerating example entity types (PDF page, email, article) and a concrete purpose (quoting/verifying). This clearly distinguishes it from siblings like aleph_get_entity, which would satisfy a general 'fetch entity' interpretation.

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 states when to use it: after a search, when you need the actual text to quote or verify, and it tells you to pass an entity ID from search results. It does not explicitly name alternative tools or exclusion criteria, so a small inference is left to the agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.