> ## Documentation Index
> Fetch the complete documentation index at: https://docs.danubeai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Execution Result

> Read a stored tool result back by its execution handle, whole or by path

## Overview

Every execution response carries an `execution_id`. Pass it here to read the full stored result, or only the subtree at `path`, without re-running the tool. Use it after a projected call (`fields` on [Call Tool](/api-reference/endpoint/call_tools)) to reach what you left out, or after a truncated response to page through the rest by path instead of asking the upstream service again.

**Auth:** Required. API key (`danube-api-key` header) or JWT. Only the caller who ran the tool can read it. Any other handle, and any handle that is not a UUID, returns 404.

## Path Parameters

<ParamField path="execution_id" type="string" required>
  The `execution_id` from an execution response
</ParamField>

## Query Parameters

<ParamField query="path" type="string">
  Dotted path into the stored result: `a.b.c` for nested keys, `items[].name` for every element of a list, `items[0].name` for one element, `*` for every key or element at that level. Quote a key that contains dots with backticks. A path that continues into a string carrying JSON is resolved inside that document, and a `<json>` segment copied from a redaction report is accepted and skipped. For a tool served by an MCP server the stored result is that server's envelope; a path is tried against the JSON inside its text block first, then against the envelope itself, so both `deployment.phase` and `content[0].text` work.
</ParamField>

<ParamField query="max_chars" type="integer" default={50000}>
  Size cap on `result`, in serialized characters. Clamped to 100 at the low end and 2,000,000 at the high end.
</ParamField>

## Response

<ResponseField name="execution_id" type="string">
  The handle you passed
</ResponseField>

<ResponseField name="tool_id" type="string">
  The tool that was executed
</ResponseField>

<ResponseField name="status" type="string">
  `success` or `error`
</ResponseField>

<ResponseField name="executed_at" type="string">
  When the tool ran
</ResponseField>

<ResponseField name="error" type="string">
  The execution's error message, or `null`
</ResponseField>

<ResponseField name="path" type="string">
  The `path` you passed, or `null`
</ResponseField>

<ResponseField name="result" type="any">
  The stored result, or the subtree at `path`. `null` when the selection is null, when nothing matched, or when the execution stored nothing (a failed execution does). Structured JSON is capped at element boundaries, so it stays valid JSON.
</ResponseField>

<ResponseField name="truncated" type="boolean">
  Whether `result` was shrunk to fit `max_chars`
</ResponseField>

<ResponseField name="response_meta" type="object">
  `null` unless `truncated`. Then `truncated`, `original_response_chars`, `response_chars`, `dropped_items` (per array path, `kept` and `total`) and `cursor` when the payload carries a pagination cursor.
</ResponseField>

<ResponseField name="path_matched" type="boolean">
  Present only when `path` was given. `false` means nothing in the stored result matched, which otherwise reads exactly like a stored null or an empty collection. A path that crosses a collection that is genuinely empty also reports `false`, so a miss does not always mean the path is wrong.
</ResponseField>

<ResponseField name="stored_truncated" type="boolean">
  Present, and `true`, only when the stored result is itself a capped form of what the tool returned. Elements that were never stored cannot be paged to.
</ResponseField>

<ResponseField name="stored_meta" type="object">
  Present with `stored_truncated`: `truncated`, `original_chars`, `stored_chars`, `limit`, `kind` (`json` or `text`), plus `dropped_items` and `partial_json_only` when they apply.
</ResponseField>

## Example

The Python and TypeScript SDKs do not wrap this endpoint yet.

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.danubeai.com/v1/tools/executions/exec_xyz789/result?path=deployments[].uid" \
    -H "danube-api-key: YOUR_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "execution_id": "exec_xyz789",
    "tool_id": "tool_abc123",
    "status": "success",
    "executed_at": "2026-09-11T14:02:11.412Z",
    "error": null,
    "path": "deployments[].uid",
    "result": ["dpl_a1b2c3", "dpl_d4e5f6"],
    "truncated": false,
    "response_meta": null,
    "path_matched": true
  }
  ```
</ResponseExample>

## MCP Tool

This endpoint is also available as the `fetch_result` MCP tool. On MCP the handle is `_meta.execution_id` of the original call, the size cap is `max_response_chars`, and `path_matched` rides in `_meta`:

```python theme={null}
result = await mcp.call_tool("fetch_result", {
    "execution_id": "exec_xyz789",
    "path": "deployments[].uid",
    "max_response_chars": 20000
})
```
