Skip to main content
Glama

glob

List files matching a pattern and identify cached ones to avoid unnecessary reads.

Instructions

List files matching a glob and show which are already cached.

Use it to discover files and see what search/grep can already access before you spend reads. Each match carries a cached flag; set cached_only=true to list only files already in the cache. Pair it with batch_read to pull in whatever isn't cached yet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYesGlob pattern to match (e.g. `src/**/*.py`).
directoryNoBase directory the pattern is evaluated from..
cached_onlyNoReturn only files that are already cached.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
matchesNo
patternNo
directoryNo
truncatedNo
cached_countNo
total_matchesNo
total_cached_tokensNo
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 that each match has a 'cached' flag and that setting 'cached_only=true' filters results. It implies the tool is read-only and low-cost by saying 'before you spend reads'. This adds value beyond a simple 'list files' definition, though it could be more explicit about side effects or permissions.

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 three sentences with no waste. The first sentence states the purpose, the second provides usage guidance and explains a key feature (cached flag), and the third suggests a complementary tool. Every sentence earns its place, and the most important information 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 simplicity (3 parameters, all described, output schema exists), the description is complete. It covers the tool's purpose, usage context, key feature (cached flag), and suggests a workflow with 'batch_read'. There are no missing aspects for an agent to correctly select and invoke this tool.

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?

Schema coverage is 100%, so baseline is 3. The description adds context by explaining the 'cached' flag and how 'cached_only' works ('set cached_only=true to list only files already in the cache'). It also provides usage context for the parameters, making them more meaningful than the schema alone.

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 starts with 'List files matching a glob and show which are already cached', clearly stating the verb (list) and resource (files matching a glob). It also differentiates from sibling tools 'search' and 'grep' by mentioning that the tool shows what is already cached, helping the agent decide when to use it.

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 advises: 'Use it to discover files and see what search/grep can already access before you spend reads.' It also suggests pairing with 'batch_read' to handle uncached files. While it does not list explicit alternatives or exclusions, the context is clear enough for an agent to understand when this tool is appropriate.

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/CoderDayton/semantic-cache-mcp'

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