Skip to main content
Glama

read_file

Read-onlyIdempotent

Read a project file using its relative path and return the content with line numbers. Set a maximum line count to control how much is retrieved.

Instructions

讀取專案內的一個檔案並回傳內容(附行號)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes相對於專案根目錄的檔案路徑,例如 src/ironman/llm.py
max_linesNo最多讀幾行

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnlyHint=true, idempotentHint=true, destructiveHint=false), so the bar is lower. The description adds one useful behavioral detail: content is returned with line numbers, which clarifies the output format. It doesn't mention edge cases, but the read-only nature is already disclosed by annotations.

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, well-formed sentence that immediately states the action and expected result. It front-loads the core purpose and includes the line-number caveat with no fluff or redundant phrasing.

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?

For a simple read-only tool, the description, annotations, and full schema coverage collectively provide almost all necessary context. The output format is at least partially described (line numbers), and the schema covers parameters and constraints. A minor gap is the lack of any note on error behavior, but with annotations and output schema present, this does not undermine correct invocation.

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 100%; both path and max_lines already have rich documentation in the input schema (relative path example, limits, default). The description adds nothing about parameters beyond what the schema provides, so the baseline of 3 is appropriate.

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 states a specific verb ('讀取' / 'read'), a specific resource ('專案內的一個檔案' / 'a file in the project'), and the output ('回傳內容(附行號)' / returns content with line numbers). This makes the tool's purpose unmistakable and clearly distinguishes it from sibling tools like list_files, run_tests, and git_log.

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?

The description provides no guidance on when to use this tool versus alternatives. It simply states what it does, with no mention of when to prefer read_file over list_files, run_tests, or git_log, nor any exclusions or conditions.

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

Deploy Server

Other Tools