Get GP Task Job Status
The get_gp_task_job_status tool fetches the current status of an asynchronous geoprocessing job by its job ID. It is used with GP tasks that run asynchronously. An agent calls it only when the user prompts it to check a job's status, and the result is available after the job reaches a terminal state.
Note:
This tool is always included in the default catalog. A custom catalog includes it only when the catalog contains a custom MCP tool from a web tool. For details, see Expose a web tool as a custom MCP tool.
Tool name
get_gp_task_job_status
Tool alias
Get GP Task Job Status
Objective
Return the current jobStatus (and, if available, the final result) for an asynchronous GPServer job, given the task URL and job ID returned when the job was originally submitted.
Usage guidance
get_gp_task_job_status fetches the status for an asynchronous GPServer job and returns the current job information.
This tool is used with asynchronous GP tasks. The jobId parameter is the identifier returned when the job was submitted. The description of the asynchronous custom MCP tool instructs the agent to call get_gp_task_job_status only when the user asks it to check the job status. The agent does not poll the job or check its status on its own, and the result is not returned automatically when the job completes. To get the result, prompt the agent to check the job status after the job has finished.
Check the job status
Results are available only after
jobStatusreaches a terminal state (success or failure). If the job is still running, prompt the agent to check the status again later.While the job is still running,
resultisnull. Inspectresultonly afterjobStatusconfirms that the job has completed.
Point to the task URL
Important:
taskUrl must point to the specific task, not the GPServer
The taskUrl parameter must point to a specific task within a GPServer, not to the GPServer itself. It must match the URL of the task that the job was submitted to.
When to use
An asynchronous GP job has been submitted, and the user prompts the agent to check its progress.
The agent needs to retrieve the final result of an asynchronous GP job after it has completed.
When not to use
The job was submitted synchronously. Synchronous jobs return their results directly, so there is no separate status to check.
The agent does not yet have a
jobId.get_gp_task_job_statuscannot start a job. Run the GP task first.The agent needs the task definition (its inputs and outputs) rather than a job's status. Use Get GP Task Definition instead.