Skip to main content
Glama
pvliesdonk
by pvliesdonk

Wait for Task to Finish

wait_for_task
Read-onlyIdempotent

Poll a Paperless-NGX task until it finishes or times out, confirming completion of document processing operations.

Instructions

Poll until the task reaches a terminal state or times out.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_uuidYes
timeout_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
typeNo
resultNo
statusYes
task_idYes
date_doneNo
task_typeNo
input_dataNo
result_dataNo
acknowledgedNo
date_createdYes
date_startedNo
status_displayNo
task_file_nameNo
trigger_sourceNo
duration_secondsNo
related_documentNo
task_type_displayNo
wait_time_secondsNo
related_document_idsNo
trigger_source_displayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv2.1.0
    • addedOutput schema / description
      Added value: +"Task details with structured results and compatible legacy projections."
    • addedOutput schema / properties / date_started
      Added value: +{
      +  "anyOf": [
      +    {
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedOutput schema / properties / duration_seconds
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedOutput schema / properties / input_data
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedOutput schema / properties / related_document_ids
      Added value: +{
      +  "items": {
      +    "type": "integer"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / result_data
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedOutput schema / properties / status_display
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedOutput schema / properties / task_type
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedOutput schema / properties / task_type_display
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedOutput schema / properties / trigger_source
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedOutput schema / properties / trigger_source_display
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedOutput schema / properties / wait_time_seconds
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  2. First observedv1.0.1

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the description adds value by introducing the polling behavior and the terminal-state/timeout stopping condition. There is no contradiction with the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single focused sentence with no filler, repeating structured data, or irrelevant detail. It front-loads the core behavior and stopping condition efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a low-complexity polling tool with an output schema and safety annotations, the description covers the essential behavior needed to invoke it. It could be slightly more explicit about what counts as a terminal state, but the timeout behavior is already reflected in the schema's timeout_seconds parameter.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not explain task_uuid or timeout_seconds beyond what their names and schema constraints already imply. The tool's one-sentence overview does not compensate for the lack of parameter-level documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('poll'), a clear resource ('the task'), and an explicit exit condition ('reaches a terminal state or times out'). This makes it readily distinguishable from sibling tools like get_task and list_tasks, which retrieve task information rather than block until completion.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The usage is implicitly clear: use this tool when you need to wait for a task to finish. However, the description does not explicitly state when to prefer it over alternatives such as get_task or list_tasks, nor does it mention any exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.