Skip to main content
Glama
Dathis

ZHAW Moodle MCP Server

by Dathis

moodle_read_file

Idempotent

Retrieve and read the text of course files from ZHAW Moodle (PDF, PPTX, DOCX, HTML, TXT) to summarize or explain lecture materials. Supports page ranges and partial reads for long documents.

Instructions

Read the text of a course file (PDF, PowerPoint .pptx, Word .docx, HTML, text). Downloads the file first if needed. Use this to summarise or explain lecture slides, scripts and exercise sheets. Long files come in parts: continue with next_pages.

    Args:
        resource_id: id of a single file from moodle_list_resources, moodle_search or
            moodle_get_content (folder files: "<folder id>/<path>")
        pages: page/slide range for PDF and PowerPoint, e.g. "1-10", "5" or "11-"
        max_chars: maximum characters to return (1000-100000)
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagesNo
max_charsNo
resource_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
pathYesLocal file the text was read from
textYesExtracted text; pages/slides are marked '--- Seite N ---' / '--- Folie N ---'
pagesNoRange contained in text, e.g. '1-12'
file_typeYespdf, powerpoint, word, html or text
truncatedNo
next_pagesNoPass as `pages` to continue reading
resource_idYes
total_pagesNoPages (PDF) or slides (PowerPoint)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations (readOnlyHint=false) are explained by the disclosed side effect 'Downloads the file first if needed', so the agent understands why this tool is not purely read-only. 'Long files come in parts: continue with next_pages' discloses pagination behavior beyond what annotations provide. 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?

Purpose and use case are front-loaded in the first two sentences, followed by a compact behavioral note and a dedicated Args section. Every sentence adds unique value, and the added length is fully justified by the 0% schema coverage.

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

Completeness5/5

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

The output schema and annotations already cover return shape and safety profile, so the description only needs purpose, behavior, and parameters — all covered in depth. The only miss is edge-case behavior for unsupported formats or empty results, which is minor given the schema/annotation richness.

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

Parameters5/5

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

Schema coverage is 0% — none of the three parameters have descriptions — so the description carries the full burden and succeeds. The Args block documents resource_id provenance plus the '<folder id>/<path>' syntax, gives concrete formats/examples for pages ('1-10', '5', '11-'), and states the valid range for max_chars (1000-100000).

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?

States a specific action ('Read the text of a course file') with the supported formats listed (PDF, .pptx, .docx, HTML, text), which clearly separates it from siblings like moodle_download_resource (binary download) and moodle_get_content (listing content). The use-case sentence ('summarise or explain lecture slides, scripts and exercise sheets') further pins down intent.

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?

Tells the agent when to reach for it ('Use this to summarise or explain lecture slides, scripts and exercise sheets') and even where to source the resource_id from (moodle_list_resources, moodle_search, moodle_get_content), including folder-file syntax. It does not explicitly name when-not-to-use alternatives (e.g., moodle_download_resource for the raw binary), but the download-then-read phrasing implies that boundary.

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