Give the model tools
Choose sandbox tools or define your own tools for the built-in harness.
Start from a working harness. Give it the smallest useful toolset, then add a custom tool only when the model needs another operation. All file and command effects should use the sandbox supplied to the tool.
Inspect files without Git
Section titled “Inspect files without Git”For a copied directory, mount or ephemeral workspace, compose the read and search toolsets with explicit filesystem selection. Pass inspectionTools to createHarness({ tools: inspectionTools, modelProvider }). This composition adds neither shell execution, editing nor Git tools. Add each capability explicitly when the task needs it; tool selection does not replace sandbox isolation.
Give the model ready-made tools
Section titled “Give the model ready-made tools”Pass the tools or toolsets the model needs to createHarness({ tools }). The model can call only this declared set, so start with the tools required by the task.
This reviewer reads, searches and inspects history, but cannot change a file. Every call runs in the dispatch’s sandbox, against the repository root.
Choose the toolsets
Section titled “Choose the toolsets”| Toolset | Tools | Read-only | What the model can do |
|---|---|---|---|
createHarnessFileTools() | read_file, list_files | Yes | Read UTF-8 files and list files tracked or not ignored by Git. |
createHarnessSearchTools() | search | Yes | Search files with an extended regular expression (git grep), by path, glob and case. |
createHarnessGitTools() | git | Yes | Run git status, diff, log or show with extra arguments. |
createHarnessEditTools() | write_file, edit_file | No | Create files and replace text within existing files. |
createHarnessShellTools() | shell | No | Run a sh -c command without input and read its exit status and output. |
Paths must stay inside the repository. To configure command limits, see createHarnessShellTools.
The Git tool refuses --no-index, abbreviations of blocked options, absolute or drive-qualified path arguments and parent-directory traversal. These checks prevent file comparisons outside the workspace; they do not make the local provider an isolated execution environment.
For this step, follow Create a tool for your agent.
Use tools from an MCP server
Section titled “Use tools from an MCP server”To expose an existing server’s tools, declare it with createHarness({ mcpServers }). MCP servers covers the configuration; its tool names share the same namespace.
File workspaces
Section titled “File workspaces”Listing and search default to Git selection for existing calls. Select filesystem explicitly for file workspaces; these operations run inside the borrowed sandbox, keep permission declarations and bounds, and do not follow links or apply .gitignore. See file workspaces.
Limits
Section titled “Limits”executeruns in the Outpost process on the host. Usecontext.sandboxfor files and commands; host APIs such asnode:fswould bypass the sandbox.readOnlyis a scheduling hint, not enforcement. A tool marked read-only can still write if its code does.- A result longer than 100,000 characters is truncated before it reaches the model.
API: defineHarnessTool · defineHarnessToolset · HarnessToolContext · ToolOutput · ToolResources · createHarnessFileTools · createHarnessSearchTools · createHarnessGitTools · createHarnessEditTools · createHarnessShellTools.
A built-in harness stdio MCP server receives only its declared variables (including explicit environment entries) and the basic process environment (PATH, HOME, user, temporary-directory and locale variables). Other provider secrets are not inherited by its child process. This filtering is not a security boundary against code running in the same sandbox.

