Skip to content

createFileToolProvider

createFileToolProvider(options): ToolProvider<FileProviderTools, FileToolProviderContext | undefined>

Defined in: file/provider.ts:92

ToolProvider wrapping createFileTools so root/maxReadBytes/maxWriteBytes can be set per agent.run() call via toolProviderContext (set by the workflow/host, not the model) instead of being fixed at construction time. Caches the constructed FileTools (and its FileJail’s cached realpath promise) per distinct resolved (root, maxReadBytes, maxWriteBytes) combination, since the common case is the same combination recurring across many calls in one run.

FileToolProviderOptions

ToolProvider<FileProviderTools, FileToolProviderContext | undefined>