Skip to main content
Glama

read_document

Extract text from a Moodle file by its ID, reading the local mirror or downloading it. For PDFs, select specific pages; media files return metadata instead.

Instructions

Extract the text of one file, by its file_id.

Reads the local copy when the mirror has it, and downloads through the Moodle token otherwise. pages selects PDF pages, for example 1-5 or 3. Media files return their metadata and no text: a video is not summarised here.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagesNo
file_idYes
max_charsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral burden and does it well: it discloses the local-mirror vs Moodle-download fallback, PDF page selection, and the media-file metadata-only behavior. This gives agents meaningful expectations beyond 'read a file,' though edge cases like truncation or auth are not covered.

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?

The description is compact and well-structured: purpose first, then source behavior, page selection, and media limitation. Every sentence adds useful information without redundancy or fluff. It is easy to scan and fully digest.

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?

Given that an output schema exists and no annotations are provided, the description supplies the key behavioral context needed for correct invocation: single-file scope, page range selection, and media file handling. Minor omissions like `max_chars` semantics are acceptable because the parameter name and default carry that meaning.

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 0%, so the description must compensate. It clearly explains `file_id` and `pages` with examples ('1-5' or '3'), but it does not mention `max_chars` at all. The name is self-explanatory, but the description partially fills the gap rather than completely covering all parameters.

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 and resource: 'Extract the text of one file, by its `file_id`.' This clearly states the tool's scope and differentiates it from siblings like search or courses. The focus on a single file by ID leaves no ambiguity about the operation.

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 when to use the tool: when you need the text of a specific file. It also provides useful usage context for `pages` and warns that media files return no text. However, it does not explicitly mention alternatives or state when not to use this tool, so the guidance relies on inference.

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