Get task
get_taskFollow a Paperless background task by UUID to check its pending/started/success/failure/revoked state, error message, and document IDs; optionally poll up to 30 seconds for the result.
Instructions
Follow a Paperless background task, such as an upload being processed, to its result.
Reports state (pending, started, success, failure, revoked), the error message of a failed task and the document ids once known. With wait_seconds it polls until the task ends or the wait (at most 30 s in total) is used up; wait says which: finished, timed_out (still running, call again) or not_requested. Needs the permission to view tasks in Paperless.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"task_id": "<task_id>"
},
"name": "get_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | The task id (a UUID) that an upload or other background work returned. | |
| wait_seconds | No | Wait up to this many seconds for the task to end; more than 30 is cut to 30. 0 reads it once. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | Yes | not_requested: wait_seconds was 0, so the task was read once; finished: the task ended within the wait (see state); timed_out: still running after waited_seconds, ask again. | |
| state | Yes | pending, started, success, failure or revoked. | |
| created | Yes | ||
| message | Yes | Why the task failed; null otherwise. | |
| task_id | Yes | ||
| finished | Yes | Null while the task is running. | |
| task_type | Yes | E.g. consume_file (an upload). | |
| document_ids | Yes | The documents the task created or changed, once known; may be several. | |
| waited_seconds | Yes |