Open Agent Loops
API Reference

globTool

@open-agent-loops/core


function globTool(backend): Tool;

Defined in: tools/builtin/file-read.ts:85

Build a glob tool bound to a backend.

Parameters

ParameterTypeDescription
backendFileReadBackendThe FileReadBackend that performs the actual glob.

Returns

Tool

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" })

On this page