Skip to main content
Glama

Read file

code_read
Read-only

Read a file: text as content (a range of lines with offset and limit), a binary file as base64, with its revisionId.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>",
      "org": "<org>"
    },
    "name": "code_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
orgYesslug of the organization whose trees and sites to use. Required on every call, even when only one organization is listed; a path never names it.
pathYesThe file's address, <tree>:<path>.
limitNoAt most this many lines.
offsetNoThe first line, counting from 1.
changeIdNoThe file as of this change.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare the operation as read-only, non-destructive, and not open-world. The description adds useful return behavior: text is returned as content with line-range support, binary files are returned as base64, and a revisionId is included. It does not describe default line limits, maximum sizes, error behavior, or whether revisionId is always present, so it is adequate but incomplete beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single front-loaded sentence with no filler. The parenthetical about line ranges is dense but useful, and the phrase 'with its revisionId' is slightly ambiguous, though not verbose.

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?

Since there is no output schema, the description must explain return values. It partly does so by mentioning text content, base64 for binary, and revisionId. However, it omits defaults, binary size behavior, whether revisionId is always included, and how changeId affects the returned revision, leaving meaningful gaps for a read tool.

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 five parameters in detail. The description only ties offset and limit to line ranges and mentions revisionId; it adds no extra meaning for org, changeId, or the path format beyond what the schema provides. Baseline 3 is appropriate.

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: 'Read a file.' It further clarifies that text files are returned as content and binary files as base64, and mentions revisionId. It does not explicitly distinguish this from sibling tools such as wiki_read or code_getChange, so it stops 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 Guidelines2/5

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

There is no guidance on when to use this tool versus alternatives. The description only states the capability, leaving the agent to infer usage from the name and sibling tools. No when-to-use, when-not-to-use, or alternative routing is provided.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources