Skip to main content
Glama

circuit_breaker_guard

Check upstream service health and record call outcomes to prevent cascading retry storms and IP bans across multi-agent swarms.

Instructions

    [Cost: $0.0002 USDC on Base & Solana] Distributed swarm circuit breaker and fail-fast oracle.
    Prevents cascading retry storms and IP bans across multi-agent swarms when upstreams fail.

    Args:
        service_key: Target upstream identifier (e.g. 'api.coingecko.com', 'base_rpc').
        action: 'check' to test upstream state (CLOSED/OPEN), or 'record' to log call outcome.
        success: Whether the upstream call succeeded (used when action='record').
        status_code: HTTP/RPC status code received (default: 200).
        error_message: Optional error reason if the call failed.
        payment_signature: Optional x402 Base/Solana USDC transaction hash (defaults to developer mock key).
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNocheck
successNo
service_keyYes
status_codeNo
error_messageNo
payment_signatureNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the cost ($0.0002 USDC) and the existence of check/record actions, but does not mention return values, side effects, state changes, or idempotency. It also doesn't clarify whether 'check' is a safe read operation or if 'record' has lasting effects beyond logging. The payment_signature default is mentioned, but the overall behavioral picture is incomplete.

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 description is front-loaded with purpose and cost, then follows a clear argument-style breakdown. It is longer than strictly necessary but every sentence adds value; the parameter explanations are essential given the lack of schema descriptions. No filler or redundancy.

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?

The tool has no output schema, so the description should explain what it returns (e.g., circuit state, success/failure). It does not. It also omits error conditions, rate limits, or concurrency implications. For a tool with 6 parameters and no annotation coverage, the description is adequate for invoking it but leaves gaps about the response and operational caveats.

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

Parameters5/5

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

The schema has zero descriptions, so the tool description must explain each parameter. It does this thoroughly: service_key is defined as a target upstream identifier, action specifies check vs record with expected outcomes, success and status_code are clarified in context, error_message is optional, and payment_signature has a note about the default. This fully compensates for the 0% schema coverage.

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 clearly states the tool's role as a distributed swarm circuit breaker and fail-fast oracle, with a specific goal: preventing cascading retry storms and IP bans. It uses a specific verb ('prevents') and names the resource ('swarm circuit breaker'), distinguishing it from the broad set of sibling tools.

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?

The description explains the two actions ('check' and 'record') and the parameters, but does not explicitly state when to use this tool versus alternatives like check_dependency_health, probe_upstream_endpoint, or dead_letter_queue. The use case is implied (protecting against retry storms) but no direct comparison or exclusion is given.

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