Skip to main content
Glama

glob

Find files matching glob patterns with recursive directory support, returning sorted paths while skipping hidden and vendor directories.

Instructions

Finds files matching a glob pattern. Supports ** for recursive directory matching. Returns matching file paths sorted by modification time (newest first). Skips hidden directories (.git, etc.) and common vendor directories. Use relative_paths=true to return paths relative to the search directory (saves tokens).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYesGlob pattern to match files (e.g. **/*.go or src/**/*.ts)
pathNoDirectory to search in (absolute path). Defaults to current directory if empty
relative_pathsNoReturn paths relative to the search directory instead of absolute paths. Saves tokens in output. Default: false
Behavior4/5

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

With no annotations provided, the description carries the full behavioral disclosure burden effectively. It explicitly states the modification-time sorting (newest first), recursive directory support via **, and automatic exclusion of hidden/vendor directories, though it omits details on error handling or empty result behavior.

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 five-sentence structure is optimally organized with purpose front-loaded, followed by pattern capabilities, return format specifications, scope limitations, and optimization guidance. Every sentence earns its place with zero redundancy or waste.

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 moderate complexity (3 parameters) and lack of output schema or annotations, the description provides substantial behavioral context including sorting logic, directory exclusions, and path formatting options. It could be improved by briefly describing behavior when no matches are found.

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?

While the schema has 100% description coverage establishing a baseline of 3, the description adds meaningful value beyond the schema by explaining the recursive ** wildcard syntax and emphasizing the token-saving practical benefit of the `relative_paths` parameter. It compensates adequately for the lack of annotations.

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 opening sentence 'Finds files matching a glob pattern' provides a specific verb and resource that clearly distinguishes this tool from content-search siblings like `grep` and simple directory listings like `listdir`. The scope is immediately clear through the mention of glob patterns and recursive matching capabilities.

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 provides optimization guidance regarding the `relative_paths` parameter for token savings, but lacks explicit guidance on when to select this tool over siblings such as `listdir` or `grep`. The comparative context is only implied through the pattern-matching focus rather than stated explicitly.

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/knewstimek/agent-tool'

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