Skip to main content

Overview

Code analysis tools help the agent verify code quality after making changes. Rather than relying solely on reading code, the agent can run the actual type checker or linter and get machine-precise feedback.

Tools

exec (for Analysis Tasks)

The exec tool is used for running analysis commands. It is in the Essential tier and works with any model. Security level: dangerous | Tier: Essential
string
required
Shell command to run (e.g., "pnpm tsc --noEmit", "pnpm lint").
string
Working directory. Defaults to the conversation workdir.
number
default:"300000"
Timeout in milliseconds (default 5 minutes).
boolean
default:"false"
Run in the background and return immediately. Check with session_status.

image_analyze

Analyze an image file and describe its contents. Useful for screenshots, diagrams, or design files. Security level: safe | Tier: Standard
string
required
Path to the image file (PNG, JPG, GIF, WebP).
string
Specific question to ask about the image (e.g., “What errors are visible?”, “Describe the UI layout”).

Analyze a URL and extract structured understanding of its content without fetching the full HTML. Security level: safe | Tier: Standard
string
required
URL to analyze.
string
Aspect to focus on: "summary", "code", "api", "docs".

which

Find the path to a binary (equivalent to which command). Security level: safe | Tier: Standard
string
required
Command name to look up.
Returns the full path to the binary, or an error if not found.

env

Read environment variable values. Security level: safe | Tier: Standard
string
Specific environment variable to read. Omit to list all (filtered for safety).
Secret-looking variables (containing KEY, SECRET, TOKEN, PASSWORD) are automatically masked in the output.

system_info

Get system information: OS, CPU, memory, Node version, disk space. Security level: safe | Tier: Standard

process_list

List running processes. Security level: safe | Tier: Standard
string
Filter processes by name.
1

Make your changes

Use edit_file or write_file to apply code changes.
2

Type check

Pipe through head to limit output for large projects.
3

Lint

4

Run affected tests

Use test_run with the file parameter to run tests for the changed module.

Test Runner

Run automated tests after type checking passes.

File Operations

Read source files to understand the code before analyzing.