# Tool and Skill Tools

Tools that find, create, test and run other tools and skills.

| Tool | Description |
|---|---|
| `find_tools` | The tool registry. `mode=search` matches by keywords (all must match) or `select:<name>,<name>` for exact activation, and returns the matching schemas as its tool output (the tools array is never edited mid-run); `mode=list` returns names plus one-line descriptions with no schema injection — `mcp=true` narrows to MCP-exposed tools, and a system flag also lists the internal bookkeeping tools. Mode is inferred: `query` → search, otherwise list. A capability that looks missing is checked here before anything is built |
| `run_tool` | Added in v1.2.0. Calls a tool from the per-turn `Tools` list by name: `run_tool(name, args)`, with `args` matching that tool's schema (`{}` when it takes none). Every tool other than `find_tools` goes through it for providers other than `claude-code`; the runtime unpacks the call into the inner tool before confirmation and validation, and its own handler never runs. A name not fetched with `find_tools` first returns its schema for a re-call; an excluded or unregistered name is rejected. Not sent to `claude-code` |
| `edit_tool` | The tool definitions themselves. `mode=write` creates or overwrites, `mode=patch` fixes an exact string after `test_tool` failed, `mode=remove` trashes the directory (recoverable from `.Trash`). `tag` picks the file: `json` = `tool.json` (schema), `script` = `script.py` (runtime), `api` = `<name>.json` (API tool). Names are snake_case with no `script_` prefix — the runtime adds it |
| `test_tool` | Runs a script tool's `script.py` in the sandbox with JSON on stdin and returns what it printed. The verification step after every `edit_tool` write or patch; on failure the loop is `edit_tool(mode=patch)` → test again |
| `run_skill` | Load a named skill's reference material into the current turn; the result is `skill: <name>`, the skill directory, and the resolved `SKILL.md` body. It is reference, not a script to execute line by line. Since v1.1.0 a skill matched or named at the start of a run arrives the same way: the runtime records a `run_skill` call whose tool result carries the skill content, rather than adding a separate system message |
| `edit_skill` | The files under `~/.config/agenvoy/skills/`. `mode=write` creates or rewrites a file at a relative path (`my-skill/SKILL.md`), `mode=patch` replaces an exact string, `mode=remove` trashes a whole skill directory by single-segment name (recoverable from `.Trash`) |
