Skip to main content
Glama

find_files

Find and list project files and directories scoped to the workspace, respecting .gitignore. Supports glob or regex patterns, type/extension filters, depth limits, sorting, and detail views.

Instructions

Workspace-scoped file/directory finder and directory lister. Unlike shell find/fd/ls, results are confined to the active project (no .git/, node_modules/, build output, or anything else .gitignore excludes), every call is recorded in the project's stats, and the pattern semantics are consistent across hosts. pattern is optional — omit it to list everything. Supports glob and regex patterns, extension and type (file/dir/any) filters, depth limits (max_depth=1 lists one level, like ls), sort_by name/size/modified, and include_details for a per-entry [FILE]/[DIR]/[LINK] marker, size, and modified time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoDirectory to search in (absolute path, file:// URI, or workspace-relative path). Defaults to the workspace root.
typeNoRestrict to files, directories, or both. Default: 'file'.
patternNoGlob (or regex if use_regex=true) matched against the file/directory name. When the pattern contains '/' it matches the full relative path. OPTIONAL — omit it to list every entry. A literal "." only matches a file named ".".
sort_byNoOrder of the result list: 'name' (directories first, then path), 'size' (largest first), 'modified' (newest first). Default: name.
extensionNoFilter by file extension, e.g. 'go' or '.go'.
max_depthNoMaximum directory depth to descend. 1 lists one level only, like ls. Default: unlimited.
use_regexNoTreat pattern as a regular expression instead of a glob. Default false.
max_resultsNoMaximum number of results to return. Default 500.
include_hiddenNoInclude hidden files and directories (starting with '.'). Default false.
include_detailsNoRender each entry with a [FILE]/[DIR]/[LINK] marker, its size and last-modified time (symlinks as 'name -> target') instead of a bare path list. Default false.
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It reveals workspace scoping, .gitignore exclusion, stats recording, cross-host consistency, and optional pattern behavior. It also clarifies output formats (bare path list or details with markers), making the tool's behavior transparent despite being read-only.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single block of four sentences, front-loaded with the core purpose, then contrasts with shell tools, then explains key behaviors. It is dense but every sentence contributes value; it lacks fluff, though it is longer than necessary compared to highly concise examples.

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?

For a read-only search tool with 10 parameters and no output schema, the description is thorough: it covers purpose, scope, limitations, parameter behavior, and output formats. It is self-contained and leaves little ambiguity for an agent deciding when to invoke this tool.

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?

The input schema covers all 10 parameters at 100% with detailed descriptions, so the schema carries the heavy lifting. The tool description adds a narrative summary (e.g., 'pattern is optional — omit it to list everything' and 'max_depth=1 lists one level, like ls'), but these points already exist in the schema, providing no additional meaning beyond what is already structured.

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 is a 'Workspace-scoped file/directory finder and directory lister,' identifying the specific action and resource. It additionally distinguishes itself from shell find/fd/ls and sibling tools like search_in_files by clarifying its scope and function.

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 explicitly contrasts with shell find/fd/ls, highlighting the workspace confinement and .gitignore exclusions, which guides when to use this tool. It mentions consistent pattern semantics across hosts, but it doesn't explicitly reference sibling tools like search_in_files for content-based searches, leaving those alternatives unmentioned.

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/plumbkit/plumb'

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