get_gp_task_definition

The get_gp_task_definition tool fetches the description and input/output JSON Schemas of a single geoprocessing task on a GPServer. An agent typically calls it as the precursor to invoking the task, so it knows what parameters the task accepts and what shape of payload to expect back.


Tool Name

get_gp_task_definition


Tool Alias

Get GP Task Definition


Objective

Retrieve the description and input/output schemas of a specific GPServer task—used as a preparatory step before constructing a valid task-execution request.


Description

get_gp_task_definition fetches a GPServer task definition and returns its description along with its input and output JSON Schemas. The description tells you, in plain language, what the task does.

Use as a precursor to invoking a GP task

Call get_gp_task_definition before submitting a GP job. The returned inputSchema tells you which parameters the task accepts and their types, which is essential for constructing a valid execution request. The returned description (when present) explains what the task does in plain language—useful for surfacing back to the user or for guiding parameter selection.

Once the task has been invoked asynchronously, poll its progress with get_gp_task_job_status.

Pointing at the right URL

Important: taskUrl must point at the specific task, not the container

The taskUrl parameter must point at the specific task within a GPServer—not at the GPServer container itself. URL-encode task names that contain spaces.

For example, the task URL for a task named Query Development Project Applications might look like:

text https://<host>/server/rest/services/Query_Development_Project_Applications/GPServer/Query%20Development%20Project%20Applications

When to use

  • The agent needs to know what parameters a GP task accepts (and their types) before invoking it.
  • The agent needs the task's description to confirm it does what the user asked for, or to relay the description back to the user.

When not to use

  • The agent already has the task's input and output schemas from a previous call. There is no need to re-fetch them for the same task within a session.
  • The agent needs the status of a running job, not the task's metadata. Use get_gp_task_job_status instead.

Schema

The full JSON Schema definitions for the input parameters accepted by get_gp_task_definition and the output payload it returns are provided as separate files alongside this document.

Input schema

The input schema describes the single required parameter, taskUrl—the fully qualified URL of the GPServer task to inspect.

Download or view GetGPTaskDefinitionToolInputSchema.json

Output schema

The output schema describes the response object: an inputSchema JSON Schema describing the task's inputs, an outputSchema JSON Schema describing the task's outputs, and an optional description string explaining what the task does.

Download or view GetGPTaskDefinitionToolOutputSchema.json


Sample prompts to test the tool

To be added.