Tools · Files and code

glob_files

Read-only

Find files in the local project by glob pattern.

When to use: Use this to discover files before reading, editing, or reviewing them.

Example

Run for real by scripts/tool-examples.py in a small demo project, with Haiku 5.5 where the tool calls a model. The output is exactly what the tool returned.

The call

tool call
{
  "tool": "glob_files",
  "arguments": {
    "pattern": "**/*.py"
  }
}

Real output

conftest.py
src/pricing.py
tests/test_pricing.py

Parameters

NameTypeDescription
pattern*stringGlob pattern such as **/*.py or src/**/*.ts
pathstringOptional relative directory to search from
limitnumberMaximum number of results to return

* required

Read, search and edit the project; run commands, code and git.