Skip to main content
Glama

Assess a flow's reliability

cs_analyze_flow_health

Assess cloud flow reliability across recent runs: failure rate, duration percentiles, and action-level failure attribution. Read-only. Use before cs_explain_flow_run for intermittent failures.

Instructions

How reliable a cloud flow is across its recent runs: failure rate, duration spread (median and 90th percentile), and which actions the failures concentrate on. The verdict distinguishes one broken step from failures spread across many actions, which points at a connection, throttling or an unreliable downstream system instead. Read-only. Use it before cs_explain_flow_run when the complaint is 'it fails sometimes' rather than 'it failed just now'. Uses the Power Automate service (cs_login scope 'flow'). Unverified against a live tenant.

Input Schema

NameRequiredDescriptionDefault
lastNNoRuns to examine; default 50
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.
environmentIdNoPower Platform environment id (GUID). Defaults to workspace sync metadata or CPS_ENVIRONMENT_ID.
sampleFailuresNoFailed runs to open for action-level attribution; default 5

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.8
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Addedv0.1.6

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the safety burden and does so partially: it declares 'Read-only', names the required auth (Power Automate service, cs_login scope 'flow'), and flags 'Unverified against a live tenant'. It also explains what the verdict means diagnostically (one broken step vs. many actions pointing at a connection/throttling). It stops short of documenting throttling, rate limits, or cost of sampling many failed runs.

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?

Four dense sentences, each earning its place: capability, interpretive meaning of the verdict, safety/auth note, and routing guidance. The core capability is front-loaded and nothing is padding.

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?

The description covers outputs conceptually, the auth scope, and sibling routing, which is substantial for a diagnostic tool with no output schema. Minor gaps remain around the return shape and the cost/latency of scanning many runs, but an agent has enough to invoke it correctly.

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?

Schema description coverage is 100%: lastN, sampleFailures, flowId, clientId, tenantId, workspace and environmentId all carry their own defaults and provenance in the schema. The description adds no syntax or semantics beyond what the schema already states, so the baseline 3 applies.

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 (analyze/assess) and resource (a cloud flow's reliability) and enumerates the concrete outputs: failure rate, duration spread at median and 90th percentile, and action-level failure concentration. It is immediately distinguishable from siblings like cs_get_flow_run or cs_explain_flow_run, which deal with a single run.

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?

Explicitly routes the agent: 'Use it before cs_explain_flow_run when the complaint is "it fails sometimes" rather than "it failed just now".' It names the alternative tool and the condition that selects between them, so selection requires no inference.

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