glob
Search for files and directories matching a glob pattern, sorted by modification time, with limits and pagination to handle large result sets.
Instructions
Searches for files or directories matching a glob pattern and returns them sorted by modification time.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pattern": "<pattern>"
},
"name": "glob"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | The directory to search in. Defaults to empty if not specified. | |
| limit | No | The maximum number of results to return. Useful for preventing token overflow when a pattern matches thousands of files. Defaults to `100` if not specified. | |
| offset | No | The number of results to skip. Used in combination with limit to paginate through large sets of matching files. Defaults to `0` if not specified. | |
| pattern | Yes | The glob pattern to match. IMPORTANT: Patterns like `*.ts` or `src/*.rs` are automatically recursive in this tool. To search ONLY the top-level directory, you MUST use a leading slash (e.g., `/*.ts` or `/src/*.rs`). |