Skip to main content
Glama

ratelimit

ratelimit
Read-only

Shared rate limiter: take N units from a named bucket (limit per window, atomic) and learn whether you may go ahead, how many remain and when it resets. Keeps a fleet of agents under an API's quota or your own budget. cost=0 just peeks. Costs $0.002 USDC per call (x402).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
costNoUnits to take, default 1
nameYes
limitNo
spaceNoOptional shared namespace (any secret string): agents using the same space share it. Default: your paying wallet.
window_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior1/5

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

The description says the call atomically *takes* units from shared state that other agents consume — an environment-modifying, money-spending side effect — while the annotations declare readOnlyHint=true. That matters operationally: an agent told this is read-only could retry it freely, yet each retry costs $0.002 and burns quota. The description is the accurate side of the conflict, but as written it contradicts the annotation, so per the rubric this scores 1.

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?

Two sentences, front-loaded with the core mechanic, then the peer-coordination use case, then the peek mode and price. Every clause carries information (return values, atomicity, cost model) and there is no filler.

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?

With no output schema, the description correctly supplies the response contract (proceed/deny, remaining, reset time), plus atomicity and the x402 price. It leaves open the failure behaviour when the limit is exceeded and how 'limit'/'window_seconds' are established on first use of a bucket.

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 coverage is only 40% ('name', 'limit' and 'window_seconds' are undocumented in the schema), and the description compensates well: it explains that 'limit' is per window, implies 'name' is the bucket key, and clarifies 'cost' beyond the schema's 'Units to take, default 1' by specifying that cost=0 is a pure peek. It stops short of explaining what happens on conflicting limit/window values for an existing bucket.

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?

States a specific verb and resource ('take N units from a named bucket') plus the returned decision (may go ahead, how many remain, when it resets). No sibling tool does anything similar (the nearest neighbours, 'locks' and 'queue', are clearly different resources), so an agent can select it unambiguously from the name plus description alone.

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?

Gives concrete when-to-use context ('keeps a fleet of agents under an API's quota or your own budget') and distinguishes two modes: a consuming take versus 'cost=0 just peeks'. It does not name alternatives or state exclusions, but the sibling list contains no competing limiter, so this is close to complete.

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