Skip to main content
Glama

Assess a flow's reliability

cs_analyze_flow_health

Analyze cloud flow reliability across recent runs, revealing failure rate, duration spread, and which actions fail. 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

TableJSON 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. 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 full burden and does well: it states 'Read-only', discloses the service and auth scope used ('Power Automate service, cs_login scope flow'), and warns 'Unverified against a live tenant'. It also explains the interpretation logic behind the verdict. It does not mention API call volume, throttling behavior for large lastN, or latency, so it falls short of a 5.

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?

Purpose is front-loaded in the first sentence, with interpretation, usage routing, service/auth, and a caveat following in a tight paragraph. It is denser than strictly necessary and the service/auth sentence could be trimmed, but nearly every clause adds decision-relevant information.

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?

There is no output schema, so the description must convey the return values, and it does: failure rate, duration spread (median/p90), failure concentration, and what the verdict means. Combined with the routing rule, auth context, and verification caveat, nothing an agent needs to call and interpret it correctly is missing.

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%, so all seven parameters including lastN, sampleFailures, flowId and the auth/workspace overrides are already documented. The description adds only indirect meaning, hinting that failures are attributed at action level (mapping to sampleFailures) but giving no format or default guidance beyond the schema. 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?

Names a specific assessment ('reliability of a cloud flow across recent runs') and enumerates the concrete outputs: failure rate, duration spread with median and p90, and failure concentration by action. It also explicitly contrasts itself with cs_explain_flow_run, so an agent can route 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 Guidelines5/5

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

Gives an explicit when-to-use rule: '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 diagnostic condition that selects this one over it, which is exactly the routing guidance an agent needs.

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