Skip to main content
Glama

diagnose_error

Read-onlyIdempotent

Analyze a failed flow run and suggest fixes. Provide the flow_id of a failed flow. Returns root cause analysis, the specific failing node, a concrete fix suggestion (e.g. insert a Resize node, change a parameter), and confidence level. Use this whenever get_flow(view="status") shows a failed node.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flow_idYesThe unique identifier of the failed flow to diagnose.
error_contextNoAdditional context from the user about the failure. Example: "it was working before with smaller images"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, covering the safety profile. The description adds return-value details but no additional behavioral context such as side effects, permissions, or failure modes, so it stays at baseline given annotation coverage.

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?

The description is three sentences, front-loaded with the core action, then lists return values, then states the usage trigger. Every sentence earns its place with no filler.

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?

With no output schema, the description explicitly enumerates the return fields: root cause analysis, failing node, fix suggestion, and confidence level. Combined with the usage trigger and param guidance, the description is complete for an agent to invoke the tool 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%, so parameters are already well-documented. The description adds 'failed flow' context for flow_id, but this overlaps with the schema's 'failed flow to diagnose.' No significant new parameter semantics are provided.

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 uses a specific verb ('Analyze') with a clear resource ('failed flow run') and outcome ('suggest fixes'). It distinguishes itself from siblings by targeting failed flows, explicitly referencing get_flow(view="status") for detection.

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?

Explicit usage trigger is provided: 'Use this whenever get_flow(view="status") shows a failed node.' This clearly tells the agent when to select this tool over alternatives like optimize_flow or preview_flow.

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