checkOperationStatus and cancelOperation.
How Operations Work
When a tool triggers a long-running task, it returns an operation ID instead of immediate results. Your agent then polls for completion usingcheckOperationStatus.
Operation States
checkOperationStatus
Polls the status of an async operation and retrieves results when complete.
What it returns by state:
- completed
- running
- failed
Returns the operation results:
- For query operations: Paginated results with data
- For CSV export operations: An S3 download URL
cancelOperation
Gracefully stops a running operation.
Only works on operations with
running status. The operation stops at its next processing checkpoint.
If you receive an error that an operation was not found, it may have expired. Re-issue the original query to start a new operation.
Related
- Response Modes — CSV mode triggers async operations for large exports
- Pagination — Paging mode may trigger operations for large result sets

