API Reference
globTool
function globTool(backend): Tool;Defined in: tools/builtin/file-read.ts:85
Build a glob tool bound to a backend.
Parameters
| Parameter | Type | Description |
|---|---|---|
backend | FileReadBackend | The FileReadBackend that performs the actual glob. |
Returns
A Tool named glob ready to pass to the agent loop or a ToolRegistry.
Remarks
Read-only, so it keeps the default parallel execution mode. Results are shaped by formatGlobMatches.
See
Example
const tool = globTool(myFileReadBackend);
await runAgent({ ...opts, tools: [tool] });
// The model can now call: glob({ pattern: "**/*.ts", path: "src" })