Check a background job
stata_job_statusCheck a background Stata job's state, elapsed time, return code, first error, and log tail. Poll in a loop with pauses instead of blocking on long runs.
Instructions
Report one background Stata job: state (running/ok/failed/timedout/killed), elapsed time, return code, the first Stata error if the do-file aborted, and the tail of its log. Call it in a loop with a pause between calls instead of blocking on a long run.
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": {
"jobId": "<jobId>"
},
"name": "stata_job_status"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Directory the job was submitted in (default: the server working directory). | |
| jobId | Yes | Job id from stata_job_submit. |