Skip to main content
Glama

check_step

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

A4/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 verdict set, the halt contract, that the free tier never halts but returns would_halt and logs to the weekly report, and that volatile args are normalized. It does not mention auth requirements, persistent state, or rate limits.

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?

The trigger condition is front-loaded and the pro/free behavioral split is packed into a compact tail. Dense but every clause earns its place; no filler sentences.

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 covers the return verdicts, halt behavior, tier differences, and defaults well. Only minor gaps remain around side effects and authentication, which do not block correct invocation.

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 description coverage is 100%, so the baseline is 3; the description adds real conceptual value by explaining the normalization behavior ('volatile values like timestamps and ids are normalized away') and the repeat/failure loop semantics that the parameters configure.

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 (fingerprint each reported step and return a verdict of ok, loop_detected or halted), so the agent knows exactly what calling check_step does. It does not explicitly contrast itself with siblings like loop_status or weekly_report, though the 'logs it for the weekly report' clause hints at the relationship.

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?

'Call AFTER each tool call or agent step' gives an unambiguous trigger and cadence. It further instructs what to do per verdict ('on a loop, halt=true; stop the run, do not retry'), but never names an alternative tool or states conditions under which this tool should not be called.

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