Gokin includes 54 tools organized into 10 tool sets with 3 safety levels.

Safety Levels#

LevelBehaviorExamples
SafeAuto-approvedread, glob, grep, git_status
CautionAsk once, then auto-approvewrite, edit, git_add
DangerousAsk every timebash, delete, git_commit, ssh

File Operations (9)#

ToolLevelDescription
readSafeRead file with line numbers. Supports offset/limit for large files
writeCautionCreate/overwrite files
editCautionReplace lines in files. Supports regex and multi-edit
deleteDangerousDelete files/directories. Irreversible
copyCautionCopy files/directories
moveCautionMove/rename files
mkdirCautionCreate directories (parents=true for recursive)
list_dirSafeDirectory contents with sizes and types
treeSafeASCII tree of directory structure (default depth: 3)

Search (2)#

ToolLevelDescription
globSafeFind files by pattern (**/*.go). Sorted by modification date
grepSafeSearch by content (regex, context, case sensitivity)

Execution (4)#

ToolLevelDescription
bashDangerousExecute shell commands. Timeout: 30s
taskSafeLaunch sub-agents (explore, bash, general, plan, guide)
task_outputSafeGet background task results
task_stopSafeStop background tasks by ID

Git (8)#

ToolLevelDescription
git_statusSafeWorking tree status (staged, unstaged, untracked)
git_diffSafeDiff between revisions/working tree
git_logSafeCommit history (default: 10)
git_blameSafeLine-by-line authorship
git_addCautionStage files
git_branchCautionBranch management: list, create, delete, switch, merge
git_prCautionCreate/manage GitHub PRs via gh CLI
git_commitDangerousCreate commit

Planning (6)#

ToolLevelDescription
enter_plan_modeSafeEnter planning mode
update_plan_progressSafeUpdate step status
get_plan_statusSafeCurrent plan status
exit_plan_modeSafeExit planning (approve=true to execute)
undo_planSafeUndo last step
redo_planSafeRedo undone step

Code Analysis (5)#

ToolLevelDescription
refactorCautionRefactoring: rename, extract, inline. Scope: file/package/project
run_testsCautionRun tests (Go/Python/Node/Rust). Coverage
batchDangerousBulk edits: atomic bulk operations. Supports dry_run
check_impactSafeBlast radius — all dependencies and impact of a symbol change
verify_codeSafeAuto-check: detect project type and run checks

Web (2)#

ToolLevelDescription
web_fetchCautionFetch URL, convert HTML → Markdown
web_searchSafeWeb search, ranked results

Agents & Coordination (4)#

ToolLevelDescription
ask_agentSafeQuery another agent type
coordinateSafeCoordinate multiple agents on a task
shared_memorySafeInter-agent shared memory (read/write/delete/list)
update_scratchpadSafeAgent scratchpad (append/overwrite)

Memory (4)#

ToolLevelDescription
memorySafePersistent memory: add, get, search, list, remove
memorizeSafeTyped storage: fact, preference, convention, pattern
pin_contextSafePin text to system prompt for the session
history_searchSafeSearch session history (regex)

Semantic (2)#

ToolLevelDescription
semantic_searchSafeSemantic similarity search (embeddings)
code_graphSafeDependency analysis, references, callers/callees

System & Utilities (7)#

ToolLevelDescription
diffSafeDifference between two texts/files (unified diff)
envSafeEnvironment info: working dir, OS, env vars
todoSafeSession task management: add, remove, complete, list
tools_listSafeList all available tools
request_toolSafeRequest a tool not in the current set
sshDangerousExecute command on a remote server
kill_shellDangerousStop a background task

User Interface (1)#

ToolLevelDescription
ask_userSafeAsk user a question, wait for response

Tool Sets#

Gokin dynamically selects a tool set based on model, provider, and agent type.

SetPurposeTools
CoreBasic operationsread, write, edit, bash, glob, grep, ask_user, list_dir, tree, diff, todo, tools_list, request_tool
GitGit operationsgit_status, git_diff, git_add, git_commit, git_log, git_blame, git_branch, git_pr
PlanningPlanningenter_plan_mode, update_plan_progress, get_plan_status, exit_plan_mode, undo_plan, redo_plan
AgentCoordinationask_agent, coordinate, shared_memory, update_scratchpad
WebWeb accessweb_fetch, web_search
AdvancedAnalysis & testsbatch, refactor, check_impact, verify_code, run_tests
MemoryMemorymemory, memorize, pin_context, history_search
FileOpsFile operationscopy, move, delete, mkdir, env, kill_shell, ssh
SemanticCode intelligencesemantic_search, code_graph
OllamaCoreMinimal (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
GitHub MIT License © Gokin Contributors