Skip to main content
Glama

moodle_read_file

Read-only

Reads text from Moodle course files (PDF, Word, PowerPoint, Excel, ZIP, HTML, plain text) for analysis and supports offset pagination for long documents.

Instructions

Read the text of a course file for analysis: PDF, Word (.doc, .docx), PowerPoint (.ppt, .pptx), Excel (.xlsx), .zip archives, HTML and plain text. Scanned PDFs and other archive types have no readable text: use moodle_download_file for those. Long files come in parts: pass next_offset to continue.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>"
    },
    "name": "moodle_read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesA file url returned by another moodle_ tool.
siteNoSite key or URL. Optional when only one site is logged in.
offsetNoCharacter to start from.
max_charsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A4.1/5.0
Behavior4/5

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

Beyond readOnlyHint and openWorldHint, it discloses extraction capabilities, format limitations, the lack of readable text in scanned PDFs, and chunked delivery for long files. It does not clearly describe the returned pagination value or other response behavior, which matters because there is no output schema.

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?

Three compact sentences front-load the purpose, then cover exclusions and continuation without unnecessary wording. The last sentence is overly compressed, however, making its parameter guidance ambiguous.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The definition is sufficient for an initial read and provides unusually useful format and fallback guidance. Multi-part reads remain insufficiently specified because the relationship between next_offset and offset is unexplained, while the absence of an output schema leaves no structured field to resolve that ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The continuation instruction says to pass next_offset, but the input schema defines offset, not next_offset. It never clarifies that next_offset may be a returned value to supply as offset, and it adds no semantic explanation for max_chars, the one parameter without a schema description.

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 states a specific action and resource—reading course-file text for analysis—and enumerates supported formats. It also distinguishes the tool from moodle_download_file for scanned PDFs and unsupported archive types.

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

Usage Guidelines5/5

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

It gives explicit selection guidance: use this tool for readable text extraction and analysis, but use moodle_download_file for scanned PDFs and other archive types without readable text. The final sentence additionally tells the agent that continuation is required for long files.

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