A tool is a map of {:id :handler :spec}. The :spec is the JSON schema the model sees; the :handler is (fn [args ctx] ...). Registries are immutable maps owned per agent, so enabling a subset for one agent does not affect another.

Files

ToolArgumentsNotes
read_filepath, start_line?, end_line?Paths resolve against the session’s cwd. Line ranges are 1-based and inclusive.
write_filepath, contentWrites the full text of the file.
list_directorypath?Defaults to the session’s cwd.

Shell

ToolArgumentsNotes
run_commandcommandRuns via the shell in the session’s cwd; output is capped.

Clojure

ToolArgumentsNotes
eval_clojurecode, namespace?Evaluates one form in the harness’s JVM. Defaults to clai.home.core; a namespace that is not loaded is required from the classpath.

eval_clojure code runs in the same process as the REPL and the web daemon. Values defined with def persist between calls. The default namespace provides help, tools, tool, context, session, history, vars, var-detail, and active-plugins, plus aliases for the namespaces an agent most often wants.

Sub-agents

ToolArgumentsNotes
spawn_agentprompt, system_prompt?, tools?, model?, max_rounds?, cwd?Runs a child agent and returns only its final reply. Nested sub-agents are allowed up to a small depth limit.

The child defaults to every parent tool except spawn_agent, the parent’s model and working directory, and a focused sub-agent system prompt. Pass tools: [] for no tools. max_rounds is clamped to 32.

clojure-lsp

All six tools use clojure-lsp, kept warm per project. Position-taking tools accept symbol, or file plus a 1-based line and optional column.

ToolArgumentsNotes
lsp_definitionsymbol?, file?, line?, column?Where a var or namespace is defined.
lsp_referencessymbol?, file?, line?, column?Every place a var or namespace is used.
lsp_hoversymbol?, file?, line?, column?Signature, docstring, and source location.
lsp_symbolsquery, limit?Search vars and namespaces by name substring.
lsp_outlinefileThe namespaces and vars one file defines.
lsp_diagnosticsfile?Lint problems for one file, or the whole project when omitted.

Only the project’s sources are indexed. For clojure.core or library vars, eval_clojure with (doc ...) or (source ...) is the fallback.

Notes

Notes are titled Markdown documents in PostgreSQL. Links are written as [[Note title]] and read out of the content rather than stored separately.

ToolArgumentsNotes
notes_listnoneMost recently updated first, with id, title, time, and a preview.
notes_searchquery, limit?BM25-ranked when pg_textsearch is available, substring otherwise.
notes_readidContent, links, backlinks; long content is truncated.
notes_updateid, title?, content?Partial update; omitted fields keep their stored value.
notes_deleteidPermanent.

OpenProject

These tools are available only when :openproject is configured.

ToolArguments
openproject_list_projectsquery?, page_size?, offset?
openproject_list_work_packagesproject?, status?, type?, assignee?, priority?, subject?, filters?, sort_by?, page_size?, offset?
openproject_create_work_packagesubject, project?, plus description, status, type, priority, assignee, parent, start_date, due_date, estimated_time
openproject_update_work_packageid, plus any writable field, project?, lock_version?
openproject_list_commentsid, limit?, include_changes?
openproject_add_commentid, comment
openproject_update_commentid (comment/activity id), comment

openproject_list_work_packages applies OpenProject’s default open-work-package filter when no filters are given; pass filters: "[]" to include closed work packages too. Updates fetch the current lock version automatically when it is not supplied.

Limits

  • Every tool result is capped (64 KiB by default) so a runaway command cannot consume the context window.
  • :max-tool-rounds caps consecutive tool-call rounds per prompt.
  • A session’s history is compacted when it exceeds :compact-after-tokens.