Skip to main content
Glama

Cloud for Bots

loop-breaker: check_step

loop_check_step

[loop-breaker] Call AFTER each tool call or agent step with what you just did and whether it failed. Loop Breaker fingerprints the call (tool + normalized args + error) and returns verdict ok, loop_detected or halted. Pro: on a loop, halt=true; stop the run, do not retry, and tell your user what repeated. Free watch-only: never halts, returns would_halt and logs it for the weekly report.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoThe arguments you passed (object or string). Volatile values like timestamps and ids are normalized away.
toolYesThe tool or step name you just ran, e.g. "browser.click" or "git push".
errorNoThe error message if the step failed. Omit or empty if it succeeded.
run_idYesAny stable id for this agent run, e.g. "nightly-sync-2026-10-15". Use the same id for every step of the run (and its sub-agents).
max_repeatsNoSame call this many times in a row (even if it succeeds) = loop. Default 5 (min 3, max 50).
max_failuresNoSame failing call this many times = loop. Default 3 (min 2, max 20).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/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 discloses the three verdicts (ok, loop_detected, halted), the Pro halt-on-loop behavior, and the Free watch-only mode returning would_halt. It stops short of 5 by omitting any auth/rate-limit or persistence details.

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-loaded with the bracketed tag and the core instruction, then the mechanism and mode differences. Every sentence carries information, though the Pro/Free sentence is dense and could be split.

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?

For a 6-parameter tool with no output schema and no annotations, the description supplies the missing return-value semantics (the verdicts) and the mode-dependent behavior. It is close to complete, with only minor missing detail on run lifecycle handling that the schema covers.

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 coverage is 100%, so the schema already documents all six parameters in detail (normalization, defaults, min/max). The description only echoes the fingerprint inputs (tool + normalized args + error) without adding syntax or format meaning beyond the schema, so the baseline 3 is correct.

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

Purpose4/5

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

The description states a specific action and resource: after each step, call this tool, which 'fingerprints the call (tool + normalized args + error)' and returns a verdict. It is clear what the tool does. It does not explicitly differentiate itself from the sibling loop_loop_status, so it falls short of a 5.

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?

It gives explicit timing ('Call AFTER each tool call or agent step') and prescribes behavior on a hit ('stop the run, do not retry, and tell your user'). That is strong contextual guidance, but it names no alternatives or when-not-to-use cases relative to the other loop_* siblings, so it stops at 4.

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