Skip to main content
Glama
VMexicano
by VMexicano

filtered_read

Read files and reduce token usage by intelligently removing noise like blanks and licenses. Modes: full, signatures (declarations), or relevant (context around a focus pattern).

Instructions

Read a file with intelligent reduction. Modes: "full" (collapses blanks, licenses, imports), "signatures" (extracts declarations only), "relevant" (focus pattern with ±10 lines context).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoReading mode: full (optimized), signatures (declarations only), or relevant (focus-based)
pathYesAbsolute or relative path to the file to read
focusNoPattern to search for in relevant mode (string or regex)
end_lineNoEnd line number (1-based, inclusive) for partial reads
start_lineNoStart line number (1-based) for partial reads
Behavior4/5

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

No annotations are provided, so the description carries full burden. It explains the three modes and their behaviors (e.g., collapsing blanks for 'full', extracting declarations for 'signatures', focusing with ±10 lines for 'relevant'), but does not mention default behavior when mode is omitted or potential side effects.

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?

Two sentences: first clearly states the purpose, second lists modes. No redundant words, front-loaded with key information.

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?

The description covers modes well but does not explain interactions between parameters (e.g., start_line/end_line and modes), default mode if unspecified, or behavior with directories. Given no output schema and 5 parameters, additional context would help.

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 coverage is 100%, so baseline is 3. The description adds minor detail beyond the schema (e.g., '+10 lines context' for relevant mode), but the schema already provides good descriptions 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 clearly states the tool reads a file with intelligent reduction and lists three distinct modes, making the purpose specific and differentiating it from sibling tools like filtered_grep and filtered_shell.

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?

The description implies usage (e.g., 'for reading files with reduction') but does not explicitly state when to use this tool versus alternatives or provide exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/VMexicano/token-filter-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server