Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Built-in Tools

Swarmie registers its built-in tools in crates/tools/src/registry.rs via core_registry().

The current core registry includes 13 tools:

ToolPurposeKey Parameters
bashRun shell commands in the workspace.command (required), timeout, description
readRead file contents (text or image).file_path (required), offset, limit
globFind files by glob pattern.pattern (required), path
grepSearch file content by pattern.pattern (required), path, output_mode, glob, type, -i, -A/-B/-C, -n, multiline, head_limit, offset
writeWrite/replace file contents.file_path (required), content (required)
editReplace a string in a file.file_path, old_string, new_string (required), replace_all
web_fetchFetch a URL and return content.url (required), prompt
web_searchSearch the web.query (required), allowed_domains, blocked_domains
notebook_editModify Jupyter notebook cells.notebook_path, new_source (required), cell_number, cell_type, edit_mode
patchApply unified diff patches.patch (required), file_path
file_searchFuzzy filename search in workspace.query (required), limit
memory_writeAppend project memory notes.content (required), file
undoRevert the latest ghost snapshot.rollout_path (required)

Examples

Read a file segment

{"file_path":"/abs/path/src/main.rs","offset":120,"limit":80}

Search text with context lines

{"pattern":"SwarmConfig","path":".","output_mode":"content","-C":2}

Apply an edit

{"file_path":"/abs/path/src/lib.rs","old_string":"foo","new_string":"bar","replace_all":false}

Fetch from the web

{"url":"https://example.com/docs","prompt":"Extract the API authentication section"}

Notes

  • Input validation happens per tool implementation in crates/tools/src/*.rs.
  • Most filesystem tools require paths to stay within the current workspace root.
  • Tool usage still goes through Swarmie's permission evaluator before execution.