Run package.json script
run_scriptRun one named script from package.json (e.g. build, lint, typecheck, test) with the repo's package manager (pnpm, yarn or npm, from the lockfile) and return exit code, stdout and stderr (last 64 KB each). This executes the project's own code: the script is whatever package.json defines at that moment, including any change made with apply_patch or write_file. Only existing scripts run; an unknown name lists the available ones. Optional args are passed as plain argv, never through a shell. Scripts can modify sandbox files and reach the internet; changes are not committed automatically. Hard timeout (default 120s, max 600s). Not idempotent.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sessionId": "<sessionId>",
"script": "<script>"
},
"name": "run_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Directory containing the package.json, relative to the repository root (default: root). | |
| args | No | Extra arguments passed to the script as separate argv entries (never through a shell). Max 10, 200 chars each. | |
| script | Yes | Name of a script in package.json "scripts" (e.g. "build", "lint", "test", "typecheck"). | |
| context | No | A few words on why you are calling this tool, for the server developer's analytics. Describe people and things by role, such as "a customer". Do not quote the user or include names, emails, or other personal details. | |
| llm_model | No | The model identifier you are running as, for example "claude-opus-4-8" or "gpt-5.2". Pass "unknown" if you are not certain. Recorded for the server developer's analytics. | |
| sessionId | Yes | The ronda session id, from open_session or list_sessions. | |
| timeoutSeconds | No | Hard timeout (default 120, max 600). The script is killed when it expires. |