Skip to main content
Glama
zix-chen
by zix-chen

Read file

read_file
Read-onlyIdempotent

Read a UTF-8 text file slice inside a configured workspace, using path, line range, and byte limits to inspect only the needed content.

Instructions

Read a UTF-8 text file slice inside the configured workspace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
encodingNoutf-8
end_lineNo
max_bytesNo
max_linesNo
start_lineNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
pathNo
errorNo
contentNo
encodingNo
end_lineNo
revisionNo
warningsNo
truncatedNo
bytes_readNo
start_lineNo
total_bytesNo
total_linesNo
output_bytesNo
output_linesNo
truncated_byNo
next_start_lineNo
revision_algorithmNo
first_line_exceeds_limitNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds the constraint that reading occurs 'inside the configured workspace' and the file must be UTF-8 text, which is useful context beyond annotations, but it does not disclose error behavior, slice behavior, or performance characteristics.

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?

A single concise sentence that front-loads the action and resource. No wasted words.

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?

With an output schema present, return values need not be explained, but the lack of parameter documentation and usage guidance leaves the definition incomplete for a tool with six parameters. It covers the core operation but misses operational details.

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

Parameters2/5

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

Schema description coverage is 0%, so the description should compensate but does not. It only mentions 'slice' suggesting line-range parameters, but provides no details on the six parameters (path, encoding, start_line, end_line, max_bytes, max_lines), leaving them semantically opaque despite clear names.

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 states a specific verb ('Read') and resource ('UTF-8 text file slice'), making the core operation unambiguous. However, it doesn't explicitly differentiate from sibling tools like read_output or view_image, which also involve reading content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives such as list_files or search_text. The description only states what it does, leaving agents to infer appropriate contexts.

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