Skip to main content
Glama

code_read

Read a file or one symbol before editing to retrieve exact content and a read_ref for subsequent edits; set budget_hint=0 to fetch the full file.

Instructions

Read a file or one symbol before editing; returns content + a read_ref to pass back when editing. budget_hint=0 → full file.

Input Schema

NameRequiredDescriptionDefault
modeNocore default; rich adds outline.
locatorNoAnchor {symbol_id}/{file_path+name}; line_range = degraded.
task_idYesTask id.
read_refNoRe-read by read_ref.
budget_hintNoMax chars; 0 = full.
workspace_dirYesProject root (abs).
expected_state_revisionNoGuard.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.28

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses that the tool returns content plus a read_ref to pass back during editing and that budget_hint=0 returns the full file, but it does not cover permissions, error behavior, or broader read-only guarantees.

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 two compact sentences, front-loads the primary purpose, then adds the return and budget details. Every clause earns its place with no wasted text.

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?

For a tool with seven parameters, a nested locator object, and no output schema, the description is minimal. It covers the core action and return artifact but leaves locator formats, required workspace/task context, and expected_state_revision guard behavior to the schema.

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%, so the schema already documents all parameters. The description restates budget_hint=0 and the read_ref lifecycle but adds no extra syntax or anchor detail beyond what the schema provides.

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 and resource: reads a file or one symbol. It also names the timing (before editing) and the return artifact (content plus read_ref). It does not distinguish itself from siblings such as code_query, so it falls short of a 5.

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?

The phrase 'before editing' gives clear usage context, and the read_ref return value explains the follow-up workflow. It does not name alternatives or when-not-to-use cases, so it is not a 5.

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