Skip to main content
Glama
holeyfield33-art

Aletheia Token Guard (ATG)

check_usage

Verify API rate-limit availability before or during work using provider headers or explicit remaining values, and prevent false blocks by returning a neutral proceed when no usage data is supplied.

Instructions

Pre-work / mid-work usage check.

Preferred path: pass the raw provider response headers dict and the platform name; ATG will parse rate-limit fields. Alternatively pass remaining_tokens / remaining_requests explicitly (host-extracted).

platform should name the actual provider ("openai" or "anthropic") when headers is supplied — an omitted/unrecognized platform merges both parsers instead of guessing OpenAI, so real Anthropic headers are never silently misread as "no limit data" (which would report a false proceed on an exhausted budget).

If neither headers nor remaining_* are provided, returns a neutral proceed signal so agents do not block.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
headersNo
platformNo
low_thresholdNo
estimated_tokensNo
remaining_tokensNo
remaining_requestsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are provided, so the description carries the behavioral burden. It discloses that ATG parses rate-limit fields, that an omitted/unrecognized platform merges parsers to avoid false proceeds, and that a no-input call returns a neutral proceed signal. It doesn't detail output shape, but an output schema exists.

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?

Three tight paragraphs with the purpose front-loaded. Every sentence adds either usage guidance or behavioral context, and the platform warning is detailed without being bloated.

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?

For a six-parameter optional tool with no schema descriptions, two parameters are undocumented in the description. The core call path is clear and the output schema covers return values, so the tool is usable but not fully complete.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must supply parameter meaning. It explains headers, platform, remaining_tokens, and remaining_requests well, but it never mentions low_threshold or estimated_tokens, leaving two parameters semantically underdetermined.

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 opens with 'Pre-work / mid-work usage check', naming the exact operation and timing. It clarifies the tool consumes provider headers or remaining counts to determine whether to proceed, which cleanly separates it from sibling checkpoint and done tools.

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

Usage Guidelines5/5

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

It gives an explicit preferred path ('pass the raw provider response headers dict and platform name') and an alternative via remaining_tokens/remaining_requests. It also warns when platform must be set, what happens if omitted, and that empty input returns a neutral proceed signal, so an agent knows when and how to call it.

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