# Krew tools & building your own

Krew = Kaptain's toolbelt: everything a model can do beyond talking.

## Families
- KodeGraph: kodegraph_search/_explore/_context/_callers/_callees/_impact/_node/_files/_index/_status
- Files: file_read/file_search/file_write/file_edit/patch_apply
- Shell/tests/git: cli_exec/test_run/git_op
- Web: web_search/web_fetch/web_fetch_raw/web_extract
- Delegation (local models): delegate/delegate_batch/delegate_status/assemble
- Skills: skill_list/skill_load
- Memory/session: remember/session_recall
- Agents: agent_list/invoke_agent + agent_<name> per granted sub-agent
- Workflow: todo/time_now/ask_user/agent_cards/vision_analyze
- Models: kaptain_models/kaptain_chat
The same belt is served to external CLIs as the `kaptain-engine` MCP server.

## Switches and the gate
- Krew view > Native Tools: per-tool on/off (built-in AND connected-MCP tools); off-list persists.
- Approval gate, four modes: Ask (popup) / Read-only (mutations denied) / Auto-approve in workspace / Full access. Set per model or per kapsule; kapsule trusted_scopes pre-approve TARGETS (a path, one MCP server, one host) without widening anything else.

## Naming
Native/cloud models see plain tool names (MCP-server tools under their raw names). CLI harnesses see external tools as ext__<server>__<tool> — no collisions.

## Build your own tools
A tool = a program that speaks MCP (any language/SDK). Three supported paths:
1. Connect as an MCP server (standard): `kaptain mcp add mytool -- /path/to/mytool` or the Krew UI; stdio or hosted HTTP. See the MCP guide.
2. Ship inside a Kapsule: kapsule.json with `"mcp": {"command": ["/path/to/mytool"]}` — tool server + agent + skills as one drop-in reviewable folder.
3. Drop an executable into plugins/ in the data folder — run as `<binary> mcp`, auto-registered (zero-ceremony; prefer 1 or 2).
All three land in the same catalog, same switches, same approval gate as built-ins.

## Doesn't exist (on purpose)
- No paste-a-shell-script tools — tools are real programs behind a real protocol (versionable, reviewable, gated).
- The built-in catalog isn't user-editable — toggle built-ins, don't rewrite them.
