Skip to main content
Glama

Compare a failed flow run with one that worked

cs_compare_flow_runs

Diff a failed flow run against a successful baseline to separate data problems from logic problems and reveal the actions where the two runs diverge.

Instructions

Diff a failed run against a successful one to separate a data problem from a logic problem. Names the action where the two runs part company, lists every action whose status differs, and flags actions present in one run but not the other, which means the definition changed between them. With compareTriggerData it also reports which top-level keys of the trigger payload differ (key names only, never the values). The baseline defaults to the most recent successful run. Read-only. Uses the Power Automate service (cs_login scope 'flow'). Unverified against a live tenant.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
runIdYesThe failed run (cs_list_flow_runs)
flowIdYesFlow id (cs_list_flows)
clientIdNoEntra app (client) id for MSAL. Defaults to CPS_CLIENT_ID, then the first-party VS Code id.
tenantIdNoEntra tenant id. Defaults to the workspace sync metadata, then CPS_TENANT_ID.
workspaceNoPath to (or inside) the agent workspace. Defaults to CPS_WORKSPACE or the current directory.
searchRunsNoHow far back to look for a successful baseline; default 50
baselineRunIdNoRun to compare against; default the most recent successful one
environmentIdNoPower Platform environment id (GUID). Defaults to workspace sync metadata or CPS_ENVIRONMENT_ID.
compareTriggerDataNoAlso compare what the trigger handed each run

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.6

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it declares read-only behavior, the Power Automate service dependency and cs_login 'flow' scope, output semantics (key names only, never values), and candidly flags it is unverified against a live tenant. Missing only things like rate limits or error behavior.

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

Conciseness4/5

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

Front-loads the purpose, then layers on output contents, the trigger-data caveat, baseline default, and operational constraints. Dense but every sentence carries information; slightly long but not padded.

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

Completeness4/5

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

No output schema exists, so the description must describe returns — and it does, enumerating the three comparison outputs. For a 9-parameter tool it covers purpose, defaults, and limits adequately, though it could say more about how results are shaped.

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

Parameters4/5

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

Schema coverage is 100% (baseline 3), and the description adds meaning beyond it: it clarifies the baseline defaults to the most recent successful run and that compareTriggerData compares trigger payloads by key name only, not value.

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?

States a specific verb (diff) and resource (failed vs successful flow run) and immediately frames the goal (separate data problem from logic problem). An agent can distinguish it from cs_get_flow_run or cs_explain_flow_run without opening the schema.

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

Usage Guidelines4/5

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

Gives clear context for when to reach for it — a failed run with an available successful baseline — and explains the default baseline selection. It does not explicitly name rival tools (cs_explain_flow_run, cs_get_flow_run) or state exclusions, so it stops short of a 5.

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

Deploy Server

Other Tools