Gokin includes 54 tools organized into 10 tool sets with 3 safety levels.
Safety Levels#
| Level | Behavior | Examples |
|---|
| Safe | Auto-approved | read, glob, grep, git_status |
| Caution | Ask once, then auto-approve | write, edit, git_add |
| Dangerous | Ask every time | bash, delete, git_commit, ssh |
File Operations (9)#
| Tool | Level | Description |
|---|
| read | Safe | Read file with line numbers. Supports offset/limit for large files |
| write | Caution | Create/overwrite files |
| edit | Caution | Replace lines in files. Supports regex and multi-edit |
| delete | Dangerous | Delete files/directories. Irreversible |
| copy | Caution | Copy files/directories |
| move | Caution | Move/rename files |
| mkdir | Caution | Create directories (parents=true for recursive) |
| list_dir | Safe | Directory contents with sizes and types |
| tree | Safe | ASCII tree of directory structure (default depth: 3) |
Search (2)#
| Tool | Level | Description |
|---|
| glob | Safe | Find files by pattern (**/*.go). Sorted by modification date |
| grep | Safe | Search by content (regex, context, case sensitivity) |
Execution (4)#
| Tool | Level | Description |
|---|
| bash | Dangerous | Execute shell commands. Timeout: 30s |
| task | Safe | Launch sub-agents (explore, bash, general, plan, guide) |
| task_output | Safe | Get background task results |
| task_stop | Safe | Stop background tasks by ID |
Git (8)#
| Tool | Level | Description |
|---|
| git_status | Safe | Working tree status (staged, unstaged, untracked) |
| git_diff | Safe | Diff between revisions/working tree |
| git_log | Safe | Commit history (default: 10) |
| git_blame | Safe | Line-by-line authorship |
| git_add | Caution | Stage files |
| git_branch | Caution | Branch management: list, create, delete, switch, merge |
| git_pr | Caution | Create/manage GitHub PRs via gh CLI |
| git_commit | Dangerous | Create commit |
Planning (6)#
| Tool | Level | Description |
|---|
| enter_plan_mode | Safe | Enter planning mode |
| update_plan_progress | Safe | Update step status |
| get_plan_status | Safe | Current plan status |
| exit_plan_mode | Safe | Exit planning (approve=true to execute) |
| undo_plan | Safe | Undo last step |
| redo_plan | Safe | Redo undone step |
Code Analysis (5)#
| Tool | Level | Description |
|---|
| refactor | Caution | Refactoring: rename, extract, inline. Scope: file/package/project |
| run_tests | Caution | Run tests (Go/Python/Node/Rust). Coverage |
| batch | Dangerous | Bulk edits: atomic bulk operations. Supports dry_run |
| check_impact | Safe | Blast radius — all dependencies and impact of a symbol change |
| verify_code | Safe | Auto-check: detect project type and run checks |
Web (2)#
| Tool | Level | Description |
|---|
| web_fetch | Caution | Fetch URL, convert HTML → Markdown |
| web_search | Safe | Web search, ranked results |
Agents & Coordination (4)#
| Tool | Level | Description |
|---|
| ask_agent | Safe | Query another agent type |
| coordinate | Safe | Coordinate multiple agents on a task |
| shared_memory | Safe | Inter-agent shared memory (read/write/delete/list) |
| update_scratchpad | Safe | Agent scratchpad (append/overwrite) |
Memory (4)#
| Tool | Level | Description |
|---|
| memory | Safe | Persistent memory: add, get, search, list, remove |
| memorize | Safe | Typed storage: fact, preference, convention, pattern |
| pin_context | Safe | Pin text to system prompt for the session |
| history_search | Safe | Search session history (regex) |
Semantic (2)#
| Tool | Level | Description |
|---|
| semantic_search | Safe | Semantic similarity search (embeddings) |
| code_graph | Safe | Dependency analysis, references, callers/callees |
System & Utilities (7)#
| Tool | Level | Description |
|---|
| diff | Safe | Difference between two texts/files (unified diff) |
| env | Safe | Environment info: working dir, OS, env vars |
| todo | Safe | Session task management: add, remove, complete, list |
| tools_list | Safe | List all available tools |
| request_tool | Safe | Request a tool not in the current set |
| ssh | Dangerous | Execute command on a remote server |
| kill_shell | Dangerous | Stop a background task |
User Interface (1)#
| Tool | Level | Description |
|---|
| ask_user | Safe | Ask user a question, wait for response |
Gokin dynamically selects a tool set based on model, provider, and agent type.
| Set | Purpose | Tools |
|---|
| Core | Basic operations | read, write, edit, bash, glob, grep, ask_user, list_dir, tree, diff, todo, tools_list, request_tool |
| Git | Git operations | git_status, git_diff, git_add, git_commit, git_log, git_blame, git_branch, git_pr |
| Planning | Planning | enter_plan_mode, update_plan_progress, get_plan_status, exit_plan_mode, undo_plan, redo_plan |
| Agent | Coordination | ask_agent, coordinate, shared_memory, update_scratchpad |
| Web | Web access | web_fetch, web_search |
| Advanced | Analysis & tests | batch, refactor, check_impact, verify_code, run_tests |
| Memory | Memory | memory, memorize, pin_context, history_search |
| FileOps | File operations | copy, move, delete, mkdir, env, kill_shell, ssh |
| Semantic | Code intelligence | semantic_search, code_graph |
| OllamaCore | Minimal (Ollama) | read, write, edit, bash, glob, grep, ask_user, list_dir, todo |
Automatic Selection#
selectToolSets() in builder.go determines the set based on:
- Provider — Ollama gets
OllamaCore instead of Core - Model — small models get fewer tools
- Agent type — explore, bash, plan get only relevant tools
- Context — git repository →
Git set
Executor#
The tool execution engine:
- Parallel execution — up to 5 tools concurrently (semaphore)
- Circuit breaker — opens after 5 errors, prevents cascading failures
- Caching — read-only results cached, invalidated on writes
- Auto-formatting — post-write/edit formatting (configurable)
- Streaming — large results streamed incrementally
- Timeouts — 30s default, 2min hard limit per model round
- Max iterations — base 50 + bonus by context length