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
command
string
required
Shell command to run (e.g., "pnpm tsc --noEmit", "pnpm lint").
workdir
string
Working directory. Defaults to the conversation workdir.
timeout
number
default:"300000"
Timeout in milliseconds (default 5 minutes).
background
boolean
default:"false"
Run in the background and return immediately. Check with session_status.
{
  "command": "pnpm tsc --noEmit"
}

image_analyze

Analyze an image file and describe its contents. Useful for screenshots, diagrams, or design files. Security level: safe | Tier: Standard
path
string
required
Path to the image file (PNG, JPG, GIF, WebP).
prompt
string
Specific question to ask about the image (e.g., “What errors are visible?”, “Describe the UI layout”).
{
  "path": "screenshots/error-state.png",
  "prompt": "What error messages are visible and what might cause them?"
}

Analyze a URL and extract structured understanding of its content without fetching the full HTML. Security level: safe | Tier: Standard
url
string
required
URL to analyze.
focus
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
command
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
key
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
filter
string
Filter processes by name.
1

Make your changes

Use edit_file or write_file to apply code changes.
2

Type check

{ "command": "pnpm tsc --noEmit 2>&1 | head -50" }
Pipe through head to limit output for large projects.
3

Lint

{ "command": "pnpm lint --quiet" }
4

Run affected tests

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