Skip to main content
Glama

读项目文件内容

piweb_read_file
Read-only

Read a portion of a text file, returning one chunk by default; continue with offset=nextOffset. Only text files are accepted; binary files are rejected.

Instructions

读一个文本文件的片段(服务端按块返回,默认一块;用 offset=nextOffset 继续读下一块)。只读文本类文件,二进制会被拒。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes文件的绝对路径
offsetNo从第几个字节开始读,默认 0
max_charsNo返回内容截断长度,默认 20000
session_idNo会话 id:用于放行「被该会话引用过」的目录之外的文件

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds genuinely new behavior: server-side chunked return, one chunk by default, and the nextOffset continuation contract, plus rejection of binary files. It does not cover permission/session-scoping behavior of session_id, but the chunking contract is meaningful added context.

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 dense sentences, no filler, front-loading the chunked-read behavior before the continuation hint and the binary exclusion. Every clause carries information.

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?

Annotations cover the safety profile and the schema fully documents all four parameters, so the description only needs to add operational semantics — which it does via the chunking/continuation contract and binary rejection. Minor gaps remain around return format and session_id scoping, but no output schema exists to help.

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?

With 100% schema coverage the baseline is 3, but the description goes beyond the schema by tying 'offset' to a returned nextOffset value for pagination, which is the actual usage convention an agent needs. It does not clarify max_chars or session_id beyond what the schema already says.

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?

States a specific verb and resource ('读一个文本文件的片段') and defines the scope precisely: chunked text reads with an offset continuation. It is clearly distinct from piweb_list_files, though it never names a sibling explicitly.

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?

Gives the continuation pattern (use offset=nextOffset to read the next chunk) and a clear exclusion (binary files are rejected). It stops short of naming an alternative tool or describing when to prefer another read route, so it is context-rich but not fully routing.

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