Tools
The built-in tools and how to turn them on or off.
Built-in tools
| Tool | What it does | Default |
|---|---|---|
read | Read a text file or image | On |
write | Create or overwrite a file | On |
edit | Replace exact text in a file | On |
bash | Run a shell command | On |
grep | Search file contents | Off |
find | Find files by glob | Off |
ls | List a directory | Off |
toolsearch | Find and load deferred tools | Auto |
Relative paths resolve against the session’s working directory.
Limits
readreturns up to 2,000 lines or 50 KB, and can read a range of lines. Images (JPEG, PNG, GIF, WebP, BMP) go to the model as attachments. A model without image input is told the image was left out.writecreates parent folders as needed.edittakes a list of replacements. Each piece of text to replace must appear exactly once in the file, and no two pieces can overlap.bashreturns stdout and stderr together, cut to the last 2,000 lines or 50 KB. The full output is saved to a file in the sandbox. A non-zero exit code counts as an error. The model can set a timeout in seconds.grepuses ripgrep and returns 100 matches by default.finduses fd and returns 1,000 results by default.lsincludes dotfiles and returns 500 entries by default.
grep and find skip files in .gitignore and include hidden files. If ripgrep or fd is missing, CodeWork downloads it to ~/.codework/bin on first use. For remote sessions, the download goes inside the sandbox. In a virtual sandbox, find isn’t available.
Turn tools on or off
Each built-in tool is a plugin with the ID codework.tool.<name>. grep, find, and ls are off by default, so the agent searches with bash instead. Turn them on in your settings:
{
"plugins": [
{ "plugin": "codework.tool.grep", "enabled": true },
{ "plugin": "codework.tool.find", "enabled": true },
{ "plugin": "codework.tool.ls", "enabled": true },
],
}Set enabled to false to turn a tool off:
{
"plugins": [{ "plugin": "codework.tool.write", "enabled": false }],
}Use ~/.codework/settings.jsonc for every project, or .codework/settings.jsonc for one. Changes apply from your next message.
Deferred tools
Some tools aren’t sent to the model up front. These are deferred tools. To use one, the model first calls toolsearch with a few words. The best matches, 8 by default, are available from its next call and stay available for the rest of that thread.
Deferred tools come from plugins, or from MCP servers whose exposure (the setting for which tools the model sees) is deferred.
toolsearch turns itself on when a thread has deferred tools, or an enabled MCP server with deferred exposure. Add a settings entry to turn it off, or to turn it on when nothing is deferred:
{
"plugins": [{ "plugin": "codework.tool.toolsearch", "enabled": false }],
}More tools
Plugins can add tools, change how a built-in tool is described, or check calls before and after they run. MCP servers add their tools as mcp__<server>__<tool>.
The model can only run tools it has been sent. A call to any other tool returns an error.