stata_run
Run Stata code in a persistent session and return output for quick checks or exploration; long jobs keep running and can be polled with a wait call.
Instructions
Run Stata code in the persistent session and return the output.
code may be multi-line (supports ///, comments, locals within the block).
Use for quick checks/exploration. For real analysis prefer stata_do (saved do-file + log).
If the job exceeds wait_seconds it keeps running; then call stata_wait.
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": {
"code": "<code>"
},
"name": "stata_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| wait_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |