query_workflow
Retrieve the current state of a running Temporal workflow by executing a named query with optional JSON arguments.
Instructions
Query a running workflow for its current state
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": {
"workflow_id": "<workflow_id>",
"query_name": "<query_name>"
},
"name": "query_workflow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Arguments for the query (as JSON object) | |
| namespace | No | Temporal namespace for this operation; omit to use the server default | |
| query_name | Yes | The name of the query to execute | |
| workflow_id | Yes | The workflow execution ID to query |