Skip to main content
Glama

read_file

Read-only

Downloads files from Campus Virtual URLs and extracts text or tables from PDF, DOCX, PPTX, XLSX, ODT, ODS, RTF, EPUB, and plain text, with optional local PDF OCR.

Instructions

Descarga y extrae texto/tablas de PDF, DOCX, PPTX, XLSX, ODT, ODS, RTF, EPUB y texto. PDFs admiten page, fragmentos con offset y OCR opcional solo con modelos Tesseract locales; por defecto no ejecuta OCR ni descarga modelos.

Input Schema

NameRequiredDescriptionDefault
ocrNoSolicita OCR local para imagenes PDF; requiere modelos Tesseract locales y nunca los descarga.
urlYesURL del recurso o archivo en el Campus Virtual (ej: /mod/resource/view.php?id=... o /pluginfile.php/...)
pageNoNúmero de página o fragmento a leer, inicia en 1
formatNoSalida extra?da: markdown conserva tablas; text y raw devuelven texto plano, no bytes binarios.
offsetNoDesplazamiento para continuar un fragmento PDF truncado
page_sizeNoCantidad máxima de caracteres por fragmento (por defecto 8000; máximo 20000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered; the description adds genuinely non-obvious behavior: OCR never downloads models and is disabled by default, and PDFs support per-page/fragment reads. It stops short of describing output shape (page vs fragment, what happens on truncation), which would have made this 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.

Conciseness4/5

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

Two sentences that front-load the capability before the constraints, with no filler. It is dense but every clause carries information an agent needs; only the format enumeration slightly duplicates the schema enum.

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 six parameters, no output schema and 100% schema coverage, the description covers the format matrix and the OCR constraint well enough to call the tool correctly. What is missing is the practical consequence of truncation (which offset/page_size combination to use on a retry) and any statement about what the returned text looks like.

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 all six parameters are already documented in the schema, which sets the baseline at 3. The description restates page/fragment-offset/OCR semantics and adds the format-implies-tables nuance, but contributes no syntax or interaction detail (e.g. how offset and page_size interact) beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Uses a specific verb pair ('Descarga y extrae texto/tablas') plus an enumerated list of supported formats, which is far more precise than the generic name read_file would suggest. It does not name or distinguish itself from likely siblings like open or list_resources, so an agent must infer the boundary itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The description implies the usage domain (download and extract document content) and gives one conditional constraint (OCR only with local Tesseract models, off by default). It contains no explicit when-to-use/when-not guidance and gives no routing hint relative to open, list_resources, or get_assignment, all of which could plausibly return document content.

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