# Get Workflow Execution Results Tool

Loads persisted workflow execution outputs by `execution_id`.

For agent/tool/MCP workflows, the caller-visible result should come from `workflow_output`, set by `set_workflow_output`. The set node is not a terminator or success marker; later or parallel failures still fail the workflow. Leave `base_config.failure_mode` at the default `"stop"` for required goal/effect nodes, including AI calls and uploads: the failed node's dependent branch does not run, independent branches continue, the failure appears in the results, and the workflow is marked failed. Reserve `"stop_workflow"` for rare emergencies where a failure must immediately terminate the entire workflow, including independent branches. Use `"route_to_error"` when the graph handles the failure itself: the node's other outputs carry a skip, its trailing `error` output carries `{ node_id, node_type, message, causes }`, and the run completes with warnings.

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `execution_id` | string | Yes | Workflow execution ULID |
| `node_ids` | array[string] | Yes | Graph-local node IDs whose outputs should be returned (must contain at least 1 node ID) |

## Returns

```json
{
  "execution_id": "01...",
  "workflow_id": "01...",
  "success": true,
  "output": { "...": "..." },
  "nodes": [
    {
      "node_id": "node-a",
      "results": [
        {
          "success": true,
          "final_status": "completed",
          "input": { "input": { "x": 1 } },
          "output": { "value": "A1" }
        }
      ]
    }
  ],
  "executed": [
    { "node_id": "node-a", "success": true }
  ]
}
```

## Notes

- Use the `execution_id` ULID returned by `execute_workflow`.
- If `node_ids` is omitted or `[]`, tool returns: `specify at least 1 or more nodes to inspect outputs and results from`.
- Only requested nodes are returned.
- Requested nodes that did not execute are returned with empty `results`.
- A step input or output over 256 KiB comes back as a placeholder:
  `{"$canopy": {"type": "large_workflow_value", "size_bytes": ...}}`. Run history cannot return the
  full value. Return or store a small summary for inspection.
- Each result's `final_status` says how that node visit ended: `completed`, `failed`, `failed_stop_workflow`, `failed_routed`, `skipped`, `timed_out` or `cancelled`. `failed_routed` is a node in `route_to_error` that failed and sent its error to its `error` output: it has `success: true`, its `error` holds the failure, and its `output` holds the skips on its other outputs and the error value on `error`. Older runs can also show `failed_ignore`: the node failed and passed a default value on.
- Include the `set_workflow_output` node in `node_ids` when inspecting the result contract.
- Workflow graph node IDs are local strings, not persisted entity IDs.
