run_program
Execute native executables directly without a shell in a hidden process, capturing clean stdout, stderr, and exit codes from an argument array.
Instructions
Run a native executable DIRECTLY (no shell) in a hidden process and capture clean stdout/stderr + exit code. Use this for console programs like gh, git, docker, node, python, etc. -- direct execution captures their stdout/stderr without PowerShell pipeline semantics. Historical hidden-shell native stdout loss is executable/environment-specific; it is not universal. Provide the program and an args array (no shell quoting needed).
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": {
"program": "<program>"
},
"name": "run_program"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory. | |
| args | No | Arguments as an array; each element is passed verbatim (no shell quoting). | |
| tail | No | Keep last bytes rather than first; incomplete UTF-8 boundary scalars are omitted. | |
| stdin | No | UTF-8 stdin, max 1 MiB bytes. Empty string still opens stdin and sends EOF; no stdin in argv, environment or logs. | |
| program | Yes | Executable name on PATH or a full path, e.g. 'git' or 'C:\Program Files\GitHub CLI\gh.exe'. | |
| logOutput | No | Opt in to private file-backed raw output logs; may include secrets emitted by command. | |
| timeoutMs | No | Hard timeout in ms (default 60000). | |
| logQuotaBytes | No | Combined stdout/stderr quota (default 8 MiB); incomplete beyond quota. | |
| maxOutputBytes | No | Raw UTF-8 bytes per stream (default 1 MiB). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| log | No | ||
| detail | Yes | ||
| stderr | Yes | ||
| stdout | Yes | ||
| target | Yes | ||
| exitCode | Yes | ||
| timedOut | Yes | ||
| transport | Yes | ||
| durationMs | Yes | ||
| truncation | Yes | ||
| executionId | Yes | ||
| errorRecords | No | ||
| schemaVersion | Yes | ||
| terminationStatus | Yes | ||
| terminationCertainty | Yes | ||
| errorRecordsTruncated | No |