Skip to content

Tools Overview

kicode provides the AI with a set of tools to interact with your filesystem and execute commands. These tools enable the AI to read code, make edits, search your codebase, and run programs.

Available Tools

How Tools Work

When you make a request, the AI decides which tools to use:

you: Show me the main function
ai: I'll read the main.rs file.
[tool: read_file]
path: "src/main.rs"
1 | fn main() {
2 | let config = Config::load()?;
3 | run(config)
4 | }

The tool invocation is displayed so you can see exactly what the AI is doing.

Tool Categories

File Operations

ToolPurpose
read_fileRead file contents
write_fileCreate or overwrite files
edit_fileMake targeted edits

Search Operations

ToolPurpose
grepSearch file contents with regex
glob_searchFind files by name pattern

Command Execution

ToolPurpose
shellRun any shell command

Safety Considerations

All tools operate within your current directory. The shell tool includes safety analysis that flags dangerous commands like:

  • Destructive file operations (rm -rf)
  • Privilege escalation (sudo)
  • Force operations (git push --force)
  • Package installation (npm install -g)

See Safety Reference for the complete list.

Tool Output

Tools return structured output to the AI:

  • Success: Output shown with green indicator
  • Error: Error message with red indicator

The AI uses this feedback to adjust its approach if something fails.