Skip to main content
Glama

detect_loops

Detect exact-call repeats, periodic tool-call cycles, and ping-pong patterns in an agent trace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
traceYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Added

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. However, it only states what patterns are detected and does not disclose return format, side effects, limitations, or whether the tool is read-only. The behavioral profile is under-specified.

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 a single, direct sentence with no filler or redundancies. It is concise and front-loaded, clearly stating the tool's core function.

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

Completeness2/5

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

Given the lack of annotations, a minimal schema, and no output schema, the description is not complete enough. It fails to explain what the tool returns, the expected input format, or any behavioral nuances, making it difficult for an agent to invoke it with confidence.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, and the description only refers to 'agent trace' without explaining the structure of the trace array or the expected fields of its objects. This leaves the agent with insufficient information to construct the parameter correctly.

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 ('Detect') and clearly defines the resource: exact-call repeats, periodic tool-call cycles, and ping-pong patterns in an agent trace. This distinguishes it from siblings like analyze_trace and breakdown_cost, which have broader or different scopes.

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

Usage Guidelines3/5

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

There is no explicit guidance on when to use detect_loops over analyze_trace or breakdown_cost. The usage is implied by the name and description, but no alternatives, exclusions, or contextual triggers are mentioned.

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.

TDQS

A3.7/5.0
Disambiguation4/5

The tools have clear granularity distinctions: analyze_trace is the comprehensive diagnostic, while detect_loops and breakdown_cost target specific aspects. However, analyze_trace overlaps with both specialized tools, which could cause an agent to hesitate between calling it or the more specific one. The descriptions mitigate this by stating the scope explicitly.

Naming Consistency4/5

Three tools use snake_case, but while analyze_trace and detect_loops follow a verb_noun pattern, breakdown_cost is a compound noun phrase, deviating from the verb-first style. The naming is otherwise consistent and readable.

Tool Count5/5

With only three tools, the server stays focused on its stated purpose of trace analysis. Each tool serves a distinct role, and the count feels appropriate for a specialized utility.

Completeness5/5

The server covers loop detection, cost breakdown, and comprehensive diagnostics including stuck-state and recommendations. No obvious gaps exist for the domain, as the full diagnostic subsumes the specialized functions.