Skip to main content
Glama

Find File

find_file
Read-only

Locate files matching a specific pattern within a directory, excluding gitignored files, to help developers quickly find relevant code files in their projects.

Instructions

Finds non-gitignored files matching the given file mask within the given relative path. Returns a JSON object with the list of matching files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_maskYesThe filename or file mask (using the wildcards * or ?) to search for.
relative_pathYesThe relative path to the directory to search in; pass "." to scan the project root.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

The annotations already declare readOnlyHint=true and destructiveHint=false, indicating a safe read operation. The description adds valuable behavioral context beyond this: it specifies that gitignored files are excluded from results, describes the return format ('JSON object with the list of matching files'), and mentions the wildcard syntax (* and ?) for file masks. This provides useful operational details not covered by annotations.

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 perfectly concise with two sentences that each earn their place: the first states the core functionality with key constraints (non-gitignored, file mask matching), and the second specifies the return format. No wasted words, and the most important information (what it does) is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity, 100% schema coverage, comprehensive annotations (readOnlyHint, destructiveHint), and the presence of an output schema (which handles return value documentation), the description is complete. It covers the core functionality, key behavioral constraints (gitignore exclusion), and return format, providing everything needed for an agent to understand when and how to use this tool effectively.

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 100%, with both parameters well-documented in the schema. The description adds minimal additional parameter semantics beyond what's in the schema - it mentions wildcard usage (* and ?) which is already in the schema's description for file_mask, and provides the example '.' for project root scanning which is already in the schema for relative_path. This meets the baseline for high schema coverage.

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 specific action ('Finds non-gitignored files matching the given file mask'), the resource ('files'), and scope ('within the given relative path'). It distinguishes from sibling tools like 'list_dir' (which lists directory contents) and 'search_for_pattern' (which searches file content) by focusing on filename pattern matching while excluding gitignored files.

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 clear context about when to use this tool (searching for files by name/mask pattern while respecting gitignore). However, it doesn't explicitly state when NOT to use it or name specific alternatives among the sibling tools, though the distinction from 'list_dir' and 'search_for_pattern' is implied by the functionality described.

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/chrisgreenx-ctrl/serena'

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