Skip to main content
Glama

讀檔案

fs_read

Read text files with line ranges or PDFs by page, returning rendered page images with total page count and resume position. Essential before editing via fs_edit to capture current file state.

Instructions

讀取檔案。文字檔用行範圍;PDF 用 pages 參數(如 "1-5"、"3"),回傳頁面 PNG 圖像內容(預設單次上限 20 頁,含總頁數與續讀位置);fs_edit 前必讀以建立觀測狀態。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
pagesNoPDF 專用:N / N-M / N-,逗號並列
maxLinesNo
offsetLineNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.1/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. It discloses key behaviors: PDFs return page PNG images, a default limit of 20 pages, total page count and continuation position are included, and it establishes observation state for fs_edit. It does not cover error handling, file encoding, or behavior on missing files, but the core behavioral traits are clearly communicated.

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?

The description is a single, dense sentence that front-loads the purpose, then covers file-type differences, limits, return information, and the fs_edit prerequisite. No wasted words; every clause earns its place and the structure is logical.

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?

Given 4 parameters, no output schema, and no annotations, the description covers the main usage but leaves gaps: it does not specify the return format for text files, the precise meaning of offsetLine and maxLines beyond 'line range', error handling, or the exact nature of the 'observation state'. It is reasonably complete for a read tool but not fully self-sufficient.

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 coverage is only 25% (only 'pages' has a description). The description adds context by tying line range to text files, which maps to maxLines/offsetLine, but it does not explain those parameters individually. It gives examples for pages but does not compensate for the undocumented 'file', 'maxLines', or 'offsetLine' parameters beyond the implied line-range concept. Some value is added, but it is insufficient for the low coverage.

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 clearly states the tool reads files, distinguishes between text files (line range) and PDFs (pages parameter returning PNG images), and ties it to a specific prerequisite for fs_edit. It is unambiguous and distinct from sibling tools like fs_ls (listing) or fs_find/fs_grep (searching).

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?

It explicitly states when to use the tool: before fs_edit to establish observation state. It also provides guidance on parameter selection based on file type (text vs PDF). However, it does not explicitly mention when NOT to use it (e.g., use fs_ls for listing) or name all alternative tools, so it earns a 4 rather than a 5.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/win10ogod/Rimai'

If you have feedback or need assistance with the MCP directory API, please join our Discord server