Skip to main content
Glama

glob

Discover files using pattern matching and show each file's cache status. Use before batch reads, searches, or greps to find candidate files or inspect cache coverage.

Instructions

Discover files by glob and show whether each one is already cached.

Use this before batch_read, search, similar, or grep when you need candidate files or want to inspect cache coverage.

Routing rules:

  • Use glob to discover paths.

  • Use batch_read to seed or read them.

  • Use cached_only=true when you want to know what search/grep can already see without more reads.

Usage guidance:

  • Keep patterns specific.

  • Avoid broad patterns like **/* unless truly necessary.

  • Matches can be fed directly into batch_read.

Args: pattern: Glob pattern to expand. directory: Base directory for the glob. cached_only: Restrict results to already cached files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYes
directoryNo.
cached_onlyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
truncatedNo
patternNo
directoryNo
matchesNo
total_matchesNo
cached_countNo
total_cached_tokensNo
Behavior4/5

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

With no annotations, description explains tool behavior: it shows cache coverage and has a cached_only parameter. It advises against broad patterns and notes that matches can be fed into batch_read. Could mention behavior for ** recursion, but it's sufficient.

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?

Well-organized with sections (Routing rules, Usage guidance, Args). Every sentence is informative and concise; no redundancy.

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?

Covers purpose, usage, parameters, and integration with sibling tools. Output schema exists so return format is not needed. Complete for a glob tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage, but description defines all three parameters: pattern, directory, cached_only. This adds essential meaning beyond the schema.

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?

Description clearly states 'Discover files by glob and show whether each one is already cached.' It specifies the verb (discover), resource (files), and unique feature (cache status), differentiating from sibling tools like batch_read.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit routing rules: 'Use this before batch_read, search, similar, or grep', and clearly defines when to use glob vs other tools. Also includes usage guidance on pattern specificity.

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