Skip to main content
Glama

search_files

Find files by name or extension using glob patterns within allowed directories. Returns up to 100 matches for quick inspection.

Instructions

Searches for files matching a glob pattern within a directory tree. Results are capped at 100 entries. Path must be within allowed roots.

Use this when looking for specific files by name or extension within a project. Does not modify system state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
patternYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses the 100-entry cap, the path restriction ('within allowed roots'), and explicitly states 'Does not modify system state' for read-only behavior. These are useful behavioral traits beyond the schema. It does not cover error handling or symlink behavior, but the output schema covers return format.

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 four sentences, each adding distinct value: main purpose, constraints, usage context, and non-mutation. It is front-loaded with the primary function and wastes no words. Structure is clear and efficient.

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?

Given the tool's simplicity (2 params, output schema present), the description covers the essential aspects: what it does, constraints (cap, path whitelist), when to use, and that it's read-only. Missing details like error conditions or exact return structure are minor because the output schema exists. It is complete enough for an agent to invoke correctly.

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 description coverage is 0%, so the description must compensate. It clarifies that 'pattern' is a glob pattern and implies 'path' is the directory root (via 'within a directory tree' and 'Path must be within allowed roots'). This adds meaning beyond parameter names, but it does not specify pattern syntax or path type in detail. The baseline of 3 is appropriate given the compensation is adequate though not exhaustive.

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 verb 'Searches' and resource 'files matching a glob pattern within a directory tree'. It distinguishes from siblings like list_directory (which lists without pattern matching) and read_file (which opens a specific file) by emphasizing glob pattern search. The purpose is specific and unambiguous.

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?

The description provides explicit guidance: 'Use this when looking for specific files by name or extension within a project.' This gives a clear context for use. However, it does not mention when not to use it or name alternative tools, so it lacks exclusions or direct comparisons to siblings.

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/Ronit-k/MCPilot'

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