Skip to main content
Glama

Leer un trozo de archivo

leer
Read-only

Reads targeted file sections—symbols, classes, markdown headings, line ranges, or log tails—or an index when unspecified, avoiding full-file reads. Read-only within project root.

Instructions

Solo un trozo de un archivo: la función o clase simbolo (PHP, TS, JS, Vue, Python; lista = varias en una llamada), la sección de un .md, un rango lineas, o de un log las últimas cola o las que tienen contiene; sin nada, el índice del archivo. Úsala en vez de Read, cat o sed. Solo lectura, dentro de la raíz; no lee secretos.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colaNologs: últimas N líneas
lineasNorango «120-180»
archivoYesruta relativa a la raíz
formatoNoconciso = solo lo esencialdetallado
simboloNofunción, clase o título; lista = varios
contieneNologs: líneas con este texto
max_lineasNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and closed-world scope, but the description adds two meaningful constraints beyond them: reads are confined to the project root, and secrets are not read. The default behavior when no selector is supplied (returns the index) is also disclosed. It stops short of describing output shape or truncation behavior.

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 main sentence is long but front-loads the selector modes and every clause carries information; the two trailing sentences (use instead of X; read-only, root-scoped, no secrets) are tight. Slightly run-on, but no wasted prose.

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?

With no output schema, the description carries the burden of explaining behavior, and it covers all selector modes, the default case, and safety constraints for a 7-parameter tool. The gaps are minor: return format, truncation via `max_lineas`, and the `formato` enum's effect are unmentioned.

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 already 86%, so the baseline is 3, but the description adds real value: `simbolo` works across PHP/TS/JS/Vue/Python and accepts a list to fetch several symbols in one call, and it clarifies the conditional nature of `cola`/`contiene` (logs only) and `lineas` (a range). `formato` and `max_lineas` are not explained in the description, keeping it from a 5.

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 names a specific verb (read a portion) and enumerates every selection mode: `simbolo` for functions/classes across five languages, `.md` sections, `lineas` ranges, log `cola`/`contiene`, and the no-argument index fallback. An agent immediately understands this is a targeted file-slice reader, not a whole-file read.

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?

It explicitly routes the agent away from Read, cat, and sed, and the no-argument case is spelled out as returning the file index. It does not, however, clarify how it relates to the actual siblings `buscar` (search) and `correr` (run), so sibling disambiguation is left implicit.

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