Skip to main content
Glama

Read File

read_file

Reads and returns a text file’s full contents with line numbers prefixed to each line, enabling exact line references for breakpoints or code fixes.

Instructions

Lee y devuelve el contenido completo de un archivo de texto, con numeros de linea al principio de cada linea (formato 'N: codigo') para poder referenciar lineas exactas al pedir breakpoints o escribir el fix.

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>"
    },
    "name": "read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.3/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 does disclose the output format precisely and that it returns complete (non-truncated) content, which implies a safe read. It says nothing about behavior on missing files, binary/large files, encoding, or path resolution, which are real gaps for an unannotated tool.

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?

One sentence, front-loaded with the action and the output format, with the rationale trailing. It is tight and wastes little, though the format detail could be separated for faster scanning.

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?

An output schema exists, yet the description still usefully explains the line-number format an agent must interpret. For a single-parameter read tool that is nearly complete; only error and path-resolution behavior are missing.

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 coverage is 0% and the single parameter (path) is undocumented in the schema. The description only implies the argument names a text file; it adds nothing about whether the path is absolute or workspace-relative, allowed roots, or format expectations, so it fails to compensate for the coverage gap.

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?

States a specific verb and resource ("Lee y devuelve el contenido completo de un archivo de texto") and adds the distinctive line-numbering format ('N: codigo'). It never names a sibling (write_file, revert_file) to differentiate against, 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 Guidelines3/5

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

Implies its use case ("para poder referenciar lineas exactas al pedir breakpoints o escribir el fix"), which tells an agent this is the read step before debug/fix workflows. It gives no explicit when-not guidance and does not route to alternatives such as write_file or revert_file.

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