Skip to main content
Glama

glob

Locate files by glob pattern using recursive matching, sorted newest first. Skips hidden and generated directories and paginates results for efficient workspace search.

Instructions

Finds files matching a glob pattern. Supports ** recursive matching and sorts results by modification time (newest first). Defaults to 200 workspace-relative paths and 32768 characters per page. Skips hidden and common generated/vendor directories unless explicitly included. Returns total/has_more/truncated metadata and an opaque next_cursor.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoDirectory to search. Defaults to configured workspace, MCP client root, or current directory
limitNoMaximum paths returned per page. Default: 200, Max: 5000
cursorNoOpaque continuation cursor returned by a previous glob call
patternYesGlob pattern to match files (e.g. **/*.go or src/**/*.ts)
include_hiddenNoTraverse hidden directories. Explicit hidden roots are always searched. Default: false
relative_pathsNoReturn paths relative to the search directory. Default: true
include_ignoredNoTraverse generated/vendor directories such as node_modules, vendor, target, build, and dist. Default: false
max_output_charsNoMaximum returned text characters. Default: 32768, Max: 131072

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed8 schema fields changedv0.9.5
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "Opaque continuation cursor returned by a previous glob call",
      +  "type": "string"
      +}
    • addedInput schema / properties / include_hidden
      Added value: +{
      +  "description": "Traverse hidden directories. Explicit hidden roots are always searched. Default: false",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / include_ignored
      Added value: +{
      +  "description": "Traverse generated/vendor directories such as node_modules, vendor, target, build, and dist. Default: false",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Maximum paths returned per page. Default: 200, Max: 5000",
      +  "type": "integer"
      +}
    • addedInput schema / properties / max_output_chars
      Added value: +{
      +  "description": "Maximum returned text characters. Default: 32768, Max: 131072",
      +  "type": "integer"
      +}
    • changedInput schema / properties / path / description
      Previous value: -"Directory to search in (absolute path). Defaults to current directory if empty"New value: +"Directory to search. Defaults to configured workspace, MCP client root, or current directory"
    • changedInput schema / properties / relative_paths / description
      Previous value: -"Return paths relative to the search directory instead of absolute paths. Saves tokens in output: true or false. Default: false"New value: +"Return paths relative to the search directory. Default: true"
    • addedInput schema / properties / relative_paths / type
      Added value: +[
      +  "null",
      +  "boolean"
      +]
  2. Addedv0.8.7
  3. Removed
  4. Changed1 schema field changedv0.7.12
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "count": {
      -      "type": "integer"
      -    },
      -    "files": {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": [
      -        "null",
      -        "array"
      -      ]
      -    }
      -  },
      -  "required": [
      -    "files",
      -    "count"
      -  ],
      -  "type": "object"
      -}New value: +null
  5. First observedv0.4.2

TDQS

A4.5/5.0
Behavior5/5

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

Since no annotations are provided, the description fully carries the burden of explaining behavior. It discloses result ordering by modification time, default pagination limits, hidden and generated directory skipping, and the metadata/cursor shape, giving rich insight beyond mere function naming.

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 tight and front-loaded: the core purpose appears first, followed by behavioral specifics and return metadata. Every sentence conveys necessary information without redundancy or filler.

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 file discovery tool with eight parameters and no output schema, the description covers key operational behaviors: recursive matching, sorting, defaults, path skipping, pagination metadata, and cursor semantics. The agent has enough information to invoke the tool correctly and interpret the result.

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%, so each parameter is already documented in the input schema. The description adds useful context such as 'supports ** recursive matching' and default behaviors, but it does not meaningfully enhance per-parameter semantics 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?

The description opens with a specific verb and resource: 'Finds files matching a glob pattern.' This clearly communicates the tool's core function and differentiates it from siblings like listdir and grep by focusing on pattern-based file discovery.

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 gives clear context for when to use the tool: when matching files with glob patterns. It does not explicitly name alternative tools or provide when-not guidance, but the purpose is clear enough for an agent to select it over simpler directory listing tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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