Skip to main content
Glama

What the gate has actually saved

ratchet_get_prevented_loss
Read-onlyIdempotent

Counts duplicate action refusals in the last 30 days and computes the avoided cost from each refused action that declared an estimated cost, providing the total prevented spend.

Instructions

Counts duplicate actions refused in the last 30 days and what they would have cost. Only counts refusals where a cost was declared on the effect, so it under-reports rather than flatters. IMPORTANT: pass estimated_cost_micros on ratchet_begin_effect or this reads zero — the number is only as good as what callers declare. This is money not spent at your vendors, never money paid to Ratchet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.1

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, and non-destructive, so the bar is lower. The description adds valuable extra context beyond those: it under-reports rather than flatters, it depends on caller-declared costs, and the number represents avoided vendor spend, not money paid to Ratchet. This goes well beyond the annotation defaults and gives the agent a clear mental model of the tool's behavior and caveats.

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 efficient and front-loaded: the first sentence states the core purpose, the second explains the under-reporting behavior, the third gives the critical dependency in an 'IMPORTANT' callout, and the fourth clarifies the financial meaning. Every sentence earns its place; there is no filler or redundancy.

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

Completeness5/5

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

For a zero-parameter tool with no output schema, the description covers all essential information: what is counted, the time window, the source of the data, the reliability caveat, and the interpretation of the result. An agent would know exactly when to call this tool and what to expect. It also anticipates the common misuse of misinterpreting the number as actual revenue.

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 has zero parameters, so the schema trivially covers 100% of them. With no parameters to explain, the baseline for this dimension is 4. The description does not need to add parameter details, and it correctly references a parameter on a sibling tool (estimated_cost_micros) which is not this tool's parameter. Nothing is missing here.

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 ('counts') and a clear resource ('duplicate actions refused in the last 30 days'), and states exactly what it measures (refusals and their would-be cost). It also clarifies the semantics of the number ('money not spent at your vendors, never money paid to Ratchet'), which distinguishes it from any payment-related tool. This is unambiguous and differentiates it from siblings like ratchet_get_usage.

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 gives a critical prerequisite for meaningful use: 'pass estimated_cost_micros on ratchet_begin_effect or this reads zero'. It also clarifies the context (prevented loss) and the under-reporting behavior. However, it does not explicitly name an alternative tool or state when not to use this one, so it lacks the explicit exclusions seen in the highest tier.

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