A job's state, progress, result (job_id). wait_ms: wait up to that many ms for succeeded, failed or cancelled. A succeeded export is verified; its result has the file path. project_id instead of job_id lists its queued, running and recent jobs. approval_id reads a request (job.approval_id), approvals (state) lists them; read only, a person decides.
Behaviour#
These are the annotations of the tool definition, the hints a client uses to decide whether to ask before a call. job_get is listed by tools/list.
| Property | Value |
|---|---|
| Read only | yes |
| Destructive | no |
| Idempotent | yes |
| Reaches outside the workspace | no |
Input#
| Argument | Type | Required | Notes |
|---|---|---|---|
job_id | string | no | pattern ^job_[0-9a-hjkmnp-tv-z]{10}$ |
project_id | string | no | pattern ^prj_[0-9a-hjkmnp-tv-z]{10}$ |
approval_id | string | no | pattern ^apr_[0-9a-hjkmnp-tv-z]{10}$ |
approvals | pending, approved, rejected, expired, all | no | |
state | string, one of 7 values | no | |
wait_ms | integer | no | min 0; max 25000; default 0 |
Output#
A result has a text block, written for the model, and structured content with these members.
| Member | Type | Always present | Notes |
|---|---|---|---|
job_id | string | no | |
kind | string | no | |
state | string | no | |
progress | number | no | |
message | string | no | |
result | object | no | |
error | object | no | |
jobs | array of object | no |
Errors#
A call over HTTP without credentials fails with E_UNAUTHORIZED, and too many calls with E_RATE_LIMITED. Both are in the error codes.
Safety#
- Read only. A succeeded export is verified, and its result has the file path.
Next steps#
Ask the agent
Is the export finished? Wait up to ten seconds.
The call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "job_get",
"arguments": {
"job_id": "job_9d4f6k2m8q",
"wait_ms": 10000
}
}
}The result
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "…"
}
],
"structuredContent": {
"job_id": "job_9d4f6k2m8q",
"kind": "export",
"state": "running",
"progress": 0.4,
"project_id": "prj_7k2m9x4q1b"
}
}
}The values are illustrative. The text block holds the same result written for the model; its wording is left out here.