Skip to main content
Glama

read_file

Read-only

Extract text from Moodle course files—PDFs, Word, PowerPoint, HTML, code, plain text—using a file reference or pluginfile URL; optionally select PDF pages or PPT slides.

Instructions

Text content of a course file (PDF, Word, PowerPoint, HTML, code, plain text).

`file` is a ref from get_course_outline/get_announcements (or a Moodle pluginfile URL).
`pages` selects PDF pages or PowerPoint slides, e.g. "1-5" or "2,7-9".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
pagesNo
courseYes
max_charsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds useful capability context (which file formats yield text, that pages apply to PDF/PPT), but says nothing about truncation behavior tied to max_chars (default 60000) or what happens when a document exceeds it.

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?

Very short and front-loaded: the capability comes first, then per-parameter notes. Every sentence earns its place, with only the opening noun phrase being slightly terse rather than a full verb statement.

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 no output schema, the description correctly focuses on what comes back ('text content') and format applicability. For a 4-parameter read tool it covers the operation adequately, though the unexplained max_chars/course and unstated truncation caveat leave a gap.

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 carries the full burden. It explains 'file' (ref source) and 'pages' with a concrete syntax example ('1-5', '2,7-9'), but leaves 'course' and 'max_chars' entirely undocumented in both schema and description, so half the parameters remain opaque.

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?

The description names the concrete resource and scope — extracting text content from a course file — and enumerates supported formats (PDF, Word, PowerPoint, HTML, code, plain text), so an agent can tell it retrieves readable text. It does not explicitly contrast with the sibling download_files, but the operation is unambiguous.

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?

It gives provenance guidance ('file is a ref from get_course_outline/get_announcements') which tells the agent where to get the required input, a real usage hint. However, there is no when-not guidance and no mention of the alternative download_files for retrieving the raw file rather than its text.

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