Skip to main content
Glama

search_local_files

Search local directory files for a text pattern, retrieving matching lines with their numbers and surrounding context.

Instructions

Search local directory files for text matching pattern with line numbers and surrounding context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
patternYes
file_typeNo
case_sensitiveNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description must carry behavioral context on its own. It does usefully report that results include line numbers and surrounding context, and 'search' implies a read-only operation. However, it does not disclose recursion behavior, hidden-file handling, size limits, or whether matches are grouped by file.

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?

The description is a single sentence that packs the core action, resource, and output detail with no filler. It front-loads the verb and resource and earns every word.

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 is adequate for a straightforward search tool, especially with an output schema available, but it leaves gaps: no explicit alternative-choosing guidance, no mention of whether the search is recursive, and no mention of how file_type or case_sensitive affect results. These would matter for an agent correctly invoking the tool.

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 description coverage is 0%, so the field names are the only aid. The description adds little beyond restating that a text pattern is matched; it does not explain path semantics, file_type filtering, or case_sensitive behavior. The parameter names are self-explanatory, but the description fails to compensate for the missing schema information.

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 action (Search), a specific resource (local directory files), and distinctive output traits (line numbers and surrounding context). It clearly distinguishes from sibling tools like search_code or search_repos by explicitly scoping to local directory files.

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 for searching text within local directories, which gives some context, but it does not explicitly state when to prefer this tool over siblings like search_code or read_file, nor does it mention exclusions or limitations. The word 'local' is the only implicit signal for choosing this tool.

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/Dhananjayrbiraris/github-mcp'

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