Skip to content

MCP tools

job_get

Get job. A job's state, progress, result (job_id).

Last updated:

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.

PropertyValue
Read onlyyes
Destructiveno
Idempotentyes
Reaches outside the workspaceno

Input#

ArgumentTypeRequiredNotes
job_idstringnopattern ^job_[0-9a-hjkmnp-tv-z]{10}$
project_idstringnopattern ^prj_[0-9a-hjkmnp-tv-z]{10}$
approval_idstringnopattern ^apr_[0-9a-hjkmnp-tv-z]{10}$
approvalspending, approved, rejected, expired, allno
statestring, one of 7 valuesno
wait_msintegernomin 0; max 25000; default 0

Output#

A result has a text block, written for the model, and structured content with these members.

MemberTypeAlways presentNotes
job_idstringno
kindstringno
statestringno
progressnumberno
messagestringno
resultobjectno
errorobjectno
jobsarray of objectno

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

tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "job_get",
    "arguments": {
      "job_id": "job_9d4f6k2m8q",
      "wait_ms": 10000
    }
  }
}

The result

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.