Skip to main content
Tools are the actions that agents can invoke during a session. Each tool has a defined schema, permission requirements, and output format.

Built-in tools

File operations

ToolDescription
readRead file contents with optional offset and line limit
writeWrite content to a file (creates or overwrites)
editMake targeted string replacements in a file
multieditApply edits across multiple files in a single call
apply_patchApply a unified diff patch to one or more files
globMatch files by glob pattern
grepSearch file contents using regular expressions
lsList directory contents
ToolDescription
searchSearch files by content (grep mode) or by name (glob mode)
search_remoteWeb search, URL fetch, or code search (unified remote search)
websearchWeb search (legacy, maps to search_remote mode web)
webfetchFetch URL content (legacy, maps to search_remote mode fetch)
codesearchCode search (legacy, maps to search_remote mode code)

Execution

ToolDescription
bashExecute shell commands with configurable timeout

Agent and workflow

ToolDescription
taskDelegate work to a sub-agent (handoff or background)
todowriteCreate and update structured TODO lists
questionAsk the user interactive questions with options

Protocol and integration

ToolDescription
lspLanguage Server Protocol operations (diagnostics, symbols, hover)
skillInvoke a discovered skill
batchBatch multiple operations (experimental)
external-directoryAccess directories outside the project root

Permission mapping

Multiple tools can map to the same permission. Configuring a permission affects all mapped tools.
PermissionTools
readread
editedit, write, apply_patch, multiedit
searchsearch, glob, grep, ls
search_remotesearch_remote, websearch, webfetch, codesearch
bashbash
tasktask
external_directoryexternal-directory
todowritetodowrite
questionquestion
lsplsp
skillskill
See Permissions for how to configure access rules.

Legacy tool name migrations

Older tool names are automatically migrated:
Legacy nameCurrent equivalent
patchapply_patch
globsearch (mode: files)
listsearch (mode: files)
grepsearch (mode: content)
webfetchsearch_remote (mode: fetch)
websearchsearch_remote (mode: web)
codesearchsearch_remote (mode: code)

Custom tools

Custom tools can be added in two ways:

Plugin tools

Register tools via the tool hook in a plugin:
tool: () => ({
  'my-tool': {
    description: 'Does something useful',
    args: { query: z.string() },
    async execute(args, context) {
      return `Result: ${args.query}`
    },
  },
})

Local tool files

Place .ts or .js files in your project or global tool directory:
  • Project: .zeroxzero/tool/*.{ts,js} or .zeroxzero/tools/*.{ts,js}
  • Global: ~/.zeroxzero/tool/*.{ts,js} or ~/.zeroxzero/tools/*.{ts,js}

Controlling tool access

Use tools_allowed in agent config to restrict which tools an agent can use:
agent:
  reviewer:
    tools_allowed:
      - read
      - search
      - question
Only tools listed in tools_allowed are available. Omitting tools_allowed on native agents allows all tools by default.

See also