Skip to main content
Glama

throttle_check

Check if a request is allowed under shared API rate limits, returning remaining quota and optimal retry_after_ms when throttled to coordinate multi-agent swarms.

Instructions

    [Cost: $0.0002 USDC on Base & Solana] Sliding-window rate limiter and token bucket manager for multi-agent swarms.
    Coordinates shared API limits across autonomous agents (e.g. GitHub, CoinGecko, OpenAI RPM). Returns allowed status, remaining quota, and optimal jittered backoff delay (retry_after_ms) when throttled.

    Args:
        key: Namespace identifier for the shared API or resource (e.g. 'github_api', 'coingecko_free').
        limit: Maximum requests allowed in the sliding window (default: 10).
        window_seconds: Duration of the sliding window in seconds (default: 60).
        cost: Number of tokens to acquire (default: 1).
        payment_signature: Optional x402 Base/Solana USDC payment transaction hash or authorized key.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
costNo
limitNo
window_secondsNo
payment_signatureNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations provided, the description must disclose behavioral traits itself. It mentions the cost per call, the return data, and the jittered backoff delay. However, it does not state whether the tool mutates state (e.g., decrements quota), whether calls are idempotent, or what happens on errors. This is a partial disclosure but leaves the agent uncertain about side effects.

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 well-structured with a clear cost header, a purpose statement, and an args list. The most important information (purpose and return) is front-loaded, and the arg descriptions are concise. It is slightly longer than necessary but remains efficient and scannable.

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?

Given the tool's moderate complexity, the description covers the main inputs, outputs, and use case. It explains what the tool returns and the optional payment signature. Missing details include error handling, edge cases (e.g., what happens when the window resets), and whether the cost is always deducted. An output schema is present, so return format is likely documented elsewhere, but the description still could be more complete on failure modes.

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 schema has no descriptions (0% coverage), so the description carries the full burden. It provides explanations for all five parameters, including the default values and the purpose of each (e.g., 'key' as namespace, 'limit' as max requests). This adds substantial meaning beyond the bare schema, though it could be more detailed on interactions (e.g., how 'cost' relates to 'limit').

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 identifies the tool as a sliding-window rate limiter and token bucket manager, specifying its purpose to coordinate shared API limits across agents. It names concrete resources (GitHub, CoinGecko, OpenAI RPM) and describes the return values (allowed status, remaining quota, backoff delay). This differentiates it from the sibling tools, none of which are rate-limiting related.

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?

The description explains that the tool is meant for multi-agent swarms to coordinate shared API limits, providing clear context on when to use it. It does not explicitly mention alternatives or exclusions, but given the tool's unique role among siblings, the usage context is sufficient. A stronger statement of 'use this when' would be an improvement, but it's not misleading.

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