Skip to main content
Glama

Loop alerts

loop_alerts
Read-onlyIdempotent

Detect coding agent sessions stuck repeating the same tool call, showing the repeated input and the token cost of re-reading the conversation.

Instructions

Running sessions that are repeating the same tool call — a likely loop — with the tool, how many times, the repeated input and what the repeats paid to re-read the conversation.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "loop_alerts"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior4/5

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

Annotations already declare this a read-only, idempotent, non-destructive, closed-world operation, so the safety profile needs no restating. Beyond that, the description adds genuinely useful scope (only "running" sessions, not historical ones) and previews the fields returned: the tool, repeat count, the repeated input, and the re-read cost. The main gap is that no threshold defines what counts as a "likely loop."

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single sentence with no filler, but the trailing clause ("with the tool, how many times, the repeated input and what the repeats paid to re-read the conversation") is a loosely punctuated list that reads awkwardly and buries the return fields. Front-loading the loop condition works; the payload description could be structured more cleanly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no parameters and no output schema, the description must carry the return-value burden, and it does so at a high level by naming the four things reported. It stops short of explaining ordering, how many loops are returned, or the detection threshold, so an agent knows roughly what comes back but not its shape or limits.

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?

The tool takes zero parameters, so there is nothing for the description to disambiguate and the baseline applies. The description correctly implies a no-argument scan rather than suggesting any filtering knob, which matches the empty schema.

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

Purpose3/5

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

The description identifies the subject as "running sessions that are repeating the same tool call — a likely loop," which is enough to distinguish it from siblings like recent_sessions or cost. However, it is a noun phrase describing the data rather than a verb+resource statement of what the tool does (detect/list loops), leaving the agent to infer it is a read/report tool. Purpose is graspable but not crisply stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisites, and no mention of alternatives such as recent_sessions or cost for related diagnostics. The only implicit signal is the word "running," which scopes it to live sessions, but nothing tells the agent when to reach for this tool versus a general session listing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.