Skip to main content
Glama

read_file

Read a file's contents from an issue-specific workspace using a safe relative path, blocking traversal, absolute paths, and .git access.

Instructions

Read a file's contents from the workspace start_issue created for this issue. relative_path is resolved relative to that workspace and is refused if it is absolute, has a drive letter, is a UNC path, escapes the workspace via '..', or touches '.git'. Returns the file contents as a plain string on success, "REFUSED: ..." if the path is blocked, or "ERROR: ..." for other failures (e.g. no active workspace, file not found) -- never raises.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issue_numberYesThe issue number whose active workspace to read from; must have been started with start_issue first.
relative_pathYesPath to the file, relative to the issue workspace root. Absolute paths, drive letters, UNC paths, '..'-escaping paths, and any path touching '.git' are refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.2
    • addedInput schema / properties / issue_number / description
      Added value: +"The issue number whose active workspace to read from; must have been started with start_issue first."
    • addedInput schema / properties / relative_path / description
      Added value: +"Path to the file, relative to the issue workspace root. Absolute paths, drive letters, UNC paths, '..'-escaping paths, and any path touching '.git' are refused."
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure, and it does so thoroughly. It explains path refusal rules, return value formats ('REFUSED: ...', 'ERROR: ...'), and the guarantee that it never raises. This is exactly the kind of non-obvious behavior an agent needs to know.

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 compact and front-loaded with the core purpose, followed by path constraints and return contracts. Every sentence earns its place; there is no fluff or repetition of unrelated details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given two required parameters, no output schema, and no annotations, the description is complete: it covers the prerequisite, path resolution rules, refusal/error behavior, and success return format. An agent has everything needed to call the tool correctly and anticipate its outcomes.

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?

Schema coverage is 100%, which sets a baseline of 3, but the description adds meaningful value beyond the schema by specifying that relative_path is resolved against the issue workspace, explaining the refusal categories, and clarifying the error/refusal return strings. This helps the agent understand the actual runtime behavior for each parameter.

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 opens with a specific verb and resource: 'Read a file's contents from the workspace start_issue created for this issue.' It clearly identifies the operation, the scope, and the relationship to sibling tools like write_file and start_issue, so an agent can distinguish it without ambiguity.

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 description implies when to use the tool: to read a file within an issue-specific workspace, and it states the prerequisite that start_issue must have been run first for the issue_number. It does not explicitly name alternatives or state when not to use it, but the context is strong enough for correct selection.

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