createWorkspaceToolProvider
createWorkspaceToolProvider(
options):ToolProvider<WorkspaceTools,WorkspaceToolProviderContext|undefined>
Defined in: packages/tools/src/workspace/provider.ts:310
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 or allowNetwork is 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.
Pass either a pre-built executor or sandbox policy (allowWrite, …). cwd is set by the
workflow/host via toolProviderContext, never by the model directly — the file jail
re-scopes to it; bash write permissions come from the resolved executor’s policy.
With a supplied executor, network policy (allowNetwork, allowedDomains,
deniedDomains) does not reconfigure bash (the executor already has a network
policy) and only gates whether fetchUrl is included and which hosts it may
reach.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”ToolProvider<WorkspaceTools, WorkspaceToolProviderContext | undefined>