Skip to main content
Glama

read_file

Read-only

Read Moodle and Ed course files using paths from list_files or search_content; supports ZIP inner paths and paginates long content.

Instructions

读取 list_files/search_content 给出的课件路径;ZIP 用 inner,长内容用 offset/max_chars 分页。若要搜索未知文件先用 search_content。返回文本或 ZIP 清单。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYeslist_files/search_content 返回的路径
innerNoZIP 内路径;省略=列 ZIP 清单
offsetNo字符起点,默认0
max_charsNo最大字符数,默认20000,最高100000

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.3
    • addedInput schema / properties / inner / description
      Added value: +"ZIP 内路径;省略=列 ZIP 清单"
    • addedInput schema / properties / max_chars / description
      Added value: +"最大字符数,默认20000,最高100000"
    • addedInput schema / properties / offset / description
      Added value: +"字符起点,默认0"
    • addedInput schema / properties / path / description
      Added value: +"list_files/search_content 返回的路径"
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

readOnlyHint=true already declares the safety profile, so the description's job is to add context, which it does: ZIP archives are traversed via `inner`, long payloads are paginated with offset/max_chars, and the return is text or a ZIP listing. It stops short of error behavior (missing path, oversized file, encoding), but the added behavioral detail exceeds the annotation.

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?

Three compact clauses, front-loaded with the primary action and dependency, then the ZIP and pagination conditions, then the fallback search guidance. Every sentence carries distinct operational information with zero padding.

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 readOnlyHint covering safety and a 100%-documented schema, the description closes the remaining gaps by stating the return shape (text or ZIP listing) and the pagination model, which matters since no output schema exists. Only minor error/edge-case behavior is absent.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds use-case meaning: `inner` is the ZIP-internal selector (omitted = list the ZIP) and offset/max_chars are the pagination pair for long content. That is modest but genuine value beyond the raw schema strings.

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 verb (读取/read) and resource (课件路径/course material file), and pins the scope to paths produced by list_files/search_content, distinguishing it from those siblings. An agent can tell this is the terminal read step in the list/search -> read workflow without opening any schema.

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?

Explicitly routes the agent: paths come from list_files/search_content, and if the target file is unknown, use search_content first. This is a named alternative plus the condition that selects it, leaving nothing to inference.

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