createWorkspaceToolProvider
createWorkspaceToolProvider(
options):ToolProvider<WorkspaceTools,WorkspaceToolProviderContext|undefined>
Defined in: workspace/provider.ts:177
The Mastra-style combined file+bash+fetch surface — “everything needed to work on a
codebase in one folder,” under one cwd, plus fetchUrl (which has no working directory)
unless constructed with fetchUrl: false. Built by composing createFileToolProvider,
createBashToolProvider, and createWebToolProvider (rather than reimplementing
jail/bash/fetch construction) and translating the one shared cwd into the file and bash
field names — deliberately not combineToolProviders, which would namespace context per
source and risk the file root and bash cwd drifting apart. Timeouts are bashTimeoutMs and
fetchTimeoutMs so the two independent knobs cannot collide. For a narrower need, use the
atomic provider directly.
cwd here is set by the workflow/host via toolProviderContext, never by the model
directly, so it’s trusted to point anywhere — the file jail fully re-scopes to it, while
bash’s actual write permissions stay whatever options.executor was constructed with
(fixed, independent of cwd).
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”ToolProvider<WorkspaceTools, WorkspaceToolProviderContext | undefined>