Built-in Tools
KCode ships with 46 built-in tools for code exploration, modification, and automation.
File Operations
| Tool | Description |
|---|---|
Read | Read file contents (supports images, PDFs, notebooks) |
Write | Create new files |
Edit | Exact string replacement in existing files |
MultiEdit | Multiple edits in a single tool call |
Glob | Find files by pattern (e.g., **/*.tsx) |
Grep | Search file contents with regex (powered by ripgrep) |
GrepReplace | Find-and-replace across files with regex |
Rename | Rename or move files/directories |
LS | List directory contents |
DiffView | View diffs between files or commits |
Execution
| Tool | Description |
|---|---|
Bash | Execute shell commands with safety analysis |
Agent | Spawn subagents (general, explore, plan, custom) |
TestRunner | Run tests with framework auto-detection |
Git
| Tool | Description |
|---|---|
GitStatus | Show working tree status |
GitCommit | Create commits |
GitLog | View commit history |
Web
| Tool | Description |
|---|---|
WebFetch | Fetch and extract content from URLs (SSRF-protected) |
WebSearch | Search the web |
Worktrees
| Tool | Description |
|---|---|
EnterWorktree | Create an isolated git worktree for safe experimentation |
ExitWorktree | Leave and optionally merge worktree changes |
Planning & Tasks
| Tool | Description |
|---|---|
PlanMode | Enter/exit structured multi-step task planning |
TaskCreate | Create tasks with dependencies |
TaskGet | Read task details |
TaskList | List all tasks |
TaskUpdate | Update task status |
TaskStop | Cancel a running task |
TaskOutput | Get task output |
Scheduling
| Tool | Description |
|---|---|
CronCreate | Schedule recurring commands |
CronList | List scheduled jobs |
CronDelete | Remove scheduled jobs |
Session & Memory
| Tool | Description |
|---|---|
Clipboard | Copy/paste to system clipboard |
Undo | Revert the last file change |
Stash | Stash/restore work in progress |
LSP
| Tool | Description |
|---|---|
LSP | Language Server Protocol integration (go-to-definition, references, diagnostics) |
Communication
| Tool | Description |
|---|---|
AskUser | Request clarification from the user |
SendMessage | Inter-agent communication in swarm mode |
Skill | Invoke registered slash command skills |
ToolSearch | Discover available deferred tools |
MCP Tools
KCode supports the Model Context Protocol for external tool servers.
MCP tools appear alongside built-in tools. You can restrict which tools each server exposes:
// ~/.kcode/settings.json
{
"mcpServers": {
"my-server": {
"command": "npx",
"args": ["my-mcp-server"],
"allowedTools": ["read_*", "search_*"],
"blockedTools": ["dangerous_tool"]
}
}
}Bash Safety
KCode analyzes bash commands before execution:
- Flags destructive operations (
rm -rf,git reset --hard) - Detects secrets in arguments
- Warns about network-affecting commands
- Detects command injection patterns (pipe-to-shell, quote desync)
- Requires explicit approval for risky operations
- Protected system directories (
/etc,/usr,/bin) are blocked for writes