Give the model tools
Choose sandbox tools or define your own tools for the built-in harness.
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.
Define a tool
Section titled “Define a tool”This tool lets the model run tests inside the sandbox. The model can request the whole suite or select tests by name.
API reference: HarnessToolOptions, HarnessToolContext and ToolOutput.
A tool name must contain 1 to 64 letters, digits, _ or -. By default, an execution error is sent back to the model as a failed tool result. Set toolExecution.onError: "fail" to stop the turn instead; see Built-in harness.
Group tools into a toolset
Section titled “Group tools into a toolset”defineHarnessToolset() bundles tools and other toolsets under one name, so you can share them between harnesses.
Each tool name must be unique across the harness: its tools, nested toolsets and skill tools. A duplicate fails when you create the harness.
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.
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.