Skip to main content
Glama

Get workflow run traces

get_workflow_run_traces
Read-onlyIdempotent

Get the full per-step execution trace of a run by run id (paged). Each step lists its blocks with the input each consumed and the output it produced, plus any error_message, and the variable scope captured at that step. Use this to debug why an expression or block produced the wrong value. Large captured values are shortened, with a marker saying so: a scope entry may point at the block output beside it rather than repeat it (the value is in the same trace). On UNATTENDED runs only — a live endpoint serve, a schedule falling due — text copied verbatim from the definition (a literal expression) is also replaced by its path there; read it with get_workflow_version. Those runs are shortened harder overall too, so to capture a value in full, re-run it yourself (run_workflow / preview_dynamic_endpoint / run_schedule_now) — runs you trigger keep everything, literals included. A loop block, and an llm block with tools (an agent), lists iterations: each loop iteration or agent turn with the blocks it ran (iterations_total is how many actually ran; a long run keeps the first and last and may drop some between). For an agent turn the first block is an llm block recording that one model call — its output carries stop_reason, input/output tokens, tool_calls and the start of the reply, and started_at/finished_at give how long the call took — followed by the tools it called.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
run_idYesthe run id returned by run_workflow
page_sizeNomaximum number of step traces to return in this page
page_tokenNotoken from a previous response's next_page_token to fetch the next page

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepsYes
next_page_tokenYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / steps / items / properties / blocks / items / properties / iterations
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "blocks": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "block": {
      +              "type": "string"
      +            },
      +            "error_message": {
      +              "type": "string"
      +            },
      +            "finished_at": {
      +              "type": "integer"
      +            },
      +            "input": {
      +              "additionalProperties": true,
      +              "type": "object"
      +            },
      +            "iterations_total": {
      +              "type": "integer"
      +            },
      +            "output": {
      +              "additionalProperties": true,
      +              "type": "object"
      +            },
      +            "started_at": {
      +              "type": "integer"
      +            },
      +            "status": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "block",
      +            "status"
      +          ],
      +          "type": "object"
      +        },
      +        "type": [
      +          "null",
      +          "array"
      +        ]
      +      },
      +      "index": {
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "index",
      +      "blocks"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
  2. Changed1 schema field changed
    • removedOutput schema / properties / steps / items / properties / blocks / items / properties / iterations
      Removed value: -{
      -  "items": {
      -    "additionalProperties": false,
      -    "properties": {
      -      "blocks": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "block": {
      -              "type": "string"
      -            },
      -            "error_message": {
      -              "type": "string"
      -            },
      -            "input": {
      -              "additionalProperties": true,
      -              "type": "object"
      -            },
      -            "iterations_total": {
      -              "type": "integer"
      -            },
      -            "output": {
      -              "additionalProperties": true,
      -              "type": "object"
      -            },
      -            "status": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "block",
      -            "status"
      -          ],
      -          "type": "object"
      -        },
      -        "type": [
      -          "null",
      -          "array"
      -        ]
      -      },
      -      "index": {
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "index"
      -    ],
      -    "type": "object"
      -  },
      -  "type": [
      -    "null",
      -    "array"
      -  ]
      -}
  3. Changed1 schema field changed
    • addedOutput schema / properties / steps / items / properties / blocks / items / properties / iterations
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "blocks": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "block": {
      +              "type": "string"
      +            },
      +            "error_message": {
      +              "type": "string"
      +            },
      +            "input": {
      +              "additionalProperties": true,
      +              "type": "object"
      +            },
      +            "iterations_total": {
      +              "type": "integer"
      +            },
      +            "output": {
      +              "additionalProperties": true,
      +              "type": "object"
      +            },
      +            "status": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "block",
      +            "status"
      +          ],
      +          "type": "object"
      +        },
      +        "type": [
      +          "null",
      +          "array"
      +        ]
      +      },
      +      "index": {
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "index"
      +    ],
      +    "type": "object"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
  4. First observed

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description goes well beyond the readOnly/idempotent/destructive annotations by disclosing concrete behaviors: paged step traces, shortened large values, harder truncation on UNATTENDED runs, literal replacement by paths, and special loop/agent iteration structures with token counts and stop_reason. These are exactly the kind of non-obvious behaviors an agent needs to interpret results correctly. No contradiction with annotations was found.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Though lengthy, the description is front-loaded with the core purpose and then introduces details in a logical order: value shortening, unattended-run differences, remediation advice, loops/agents. Every sentence adds non-redundant behavioral information, so the size is justified and nothing could be cut without losing value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a moderately complex tool with an output schema, the description covers all the non-obvious semantics an agent would need: per-step blocks, consumed inputs, produced outputs, error_message, variable scope, truncation markers, literal paths, pagination, and iteration/turn details. The presence of an output schema reduces the need to describe return values, and this description goes far beyond that minimum.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides 100% coverage and already describes run_id, page_size, and page_token with meaningful text. The description reinforces that run_id refers to a run from run_workflow and that paging applies to steps, but it adds little parameter-specific meaning beyond the schema. This is the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with an explicit verb and resource: 'Get the full per-step execution trace of a run by run id (paged)', which clearly identifies what the tool does. It also narrows the intent to debugging by stating 'Use this to debug why an expression or block produced the wrong value', making it distinct from related run- and workflow-level tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly states when to use the tool ('Use this to debug why an expression or block produced the wrong value') and provides practical alternatives for different needs, such as reading literals with get_workflow_version and re-running to capture full values with run_workflow, preview_dynamic_endpoint, or run_schedule_now. This gives the agent clear routing guidance rather than leaving usage to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources