Skip to main content
Glama

Read relevant files

read_relevant_files
Read-only

Read only task-relevant files without loading the whole project. Skip sensitive content, truncate large files, and rank by lexical relevance unless you pass explicit candidates.

Instructions

Read the files most relevant to a task without loading the whole project. Either pass candidateFiles, or let the tool rank files by lexical relevance. Content is truncated, secret-masked, and sensitive files are skipped by default. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxFilesNo
projectPathYesAbsolute path to the project root.
allowSensitiveNoAllow reading sensitive files (.env, keys). Off by default.
candidateFilesNoOptional explicit list of project-relative files to read.
maxBytesPerFileNo
taskDescriptionYesWhat you are trying to do; used to rank file relevance.
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses important behavioral traits: content is truncated, secret-masked, and sensitive files are skipped by default. These are non-obvious behaviors that significantly affect how the tool is invoked and interpreted.

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?

Three sentences, each earning its place: purpose, usage modes, and key behavioral caveats. Front-loaded and no redundant fluff.

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?

The description covers purpose, usage modes, and critical limitations (truncation, masking, sensitive skip). Lacks return format or error conditions, but for a read-only tool with schema-provided defaults and annotations, it is sufficiently complete.

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?

The description enriches parameter understanding by explaining the candidateFiles vs automatic lexical-ranking mode, tying taskDescription to relevance ranking, and implying maxBytesPerFile via 'Content is truncated' and allowSensitive via 'sensitive files are skipped by default.' With 67% schema coverage, it somewhat compensates for the undocumented maxFiles and maxBytesPerFile.

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 it 'Read[s] the files most relevant to a task without loading the whole project,' which is a specific verb+resource+scope. It distinguishes itself from siblings like inspect_project and generate_patch by focusing on reading relevant file contents.

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 provides clear context for when to use (task-focused file reading) and explains the two modes (candidateFiles vs lexical ranking). However, it does not explicitly name alternatives or state when not to use this tool relative to siblings like inspect_project.

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/remimenguy/mcp-flow'

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