Skip to main content
Glama

read_course_file

Retrieve a cached course file by ID, including PDF content or extracted page-by-page text; use page limits to narrow long documents.

Instructions

Contents of a cached course file by id: the document itself (PDFs up to 10 MiB), or with as_text its extracted text per page, which also works for larger PDFs. Narrow long documents with first_page/last_page.

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": {
      "file_id": "<file_id>"
    },
    "name": "read_course_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
as_textNo
file_idYes
last_pageNo
first_pageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose meaningful behavior: a 10 MiB PDF size ceiling, that as_text returns extracted text per page, and that as_text works for files exceeding the raw-download limit. It omits permission requirements and what a 'cached' file implies (e.g., staleness or availability), which keeps it short of 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.

Conciseness5/5

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

Two compact sentences, front-loaded with the primary return value and then the mode and paging refinements. Every clause carries information; there is no filler.

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?

No output schema exists, so the description must describe return values, and it does: the raw document for PDFs up to 10 MiB, or per-page extracted text. For a four-parameter read tool this is nearly sufficient, with only paging interaction and error/edge behavior left unspecified.

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% with four parameters, so the description must compensate. It explains as_text ('its extracted text per page'), first_page/last_page ('narrow long documents'), and file_id implicitly ('by id'), which covers all four parameters at a basic level but gives no format, counting basis, or interaction details (e.g., whether last_page requires first_page).

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 gives a concrete verb and resource: it returns the contents of a cached course file identified by id, and it distinguishes two modes (raw document vs. extracted text). It does not explicitly name siblings such as list_course_files or search_course_materials, but the 'contents of a file by id' framing is specific enough for an agent to separate it from listing/searching tools.

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 implies when to use each mode (as_text for larger PDFs or text extraction, page parameters for long documents) and states the 10 MiB limit that forces the fallback path. However, there is no explicit statement of when to choose this tool over search_course_materials or list_course_files, and no prerequisites are mentioned.

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