Skip to main content
Glama

fetch_code_stats

Read-onlyIdempotent

Count the codes of a sweepstakes: total, assigned, unassigned, redeemed, voided and available. Read-only and cheap — call this before fetch_codes when the user asks "how many codes do I have left", instead of paging through the list. Read-only and NOT gated by the Codes & Coupons module: only the writes of this category document a module-not-enabled 403. If this call returns 403, look for another cause before telling the user the module is off.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sweepstakes_tokenYesThe sweepstakes token (UUID v4) of a sweepstakes of your account

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, so safety is covered. The description adds genuinely non-obvious operational context: this read is NOT gated by the Codes & Coupons module, so a 403 here has a different cause than the writes' module-not-enabled 403 — that error-path guidance is real value beyond the annotations.

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?

Front-loaded with the action and the return buckets, then the routing and error guidance. Slightly repetitive ('Read-only and cheap' vs 'Read-only and NOT gated') which costs a point, but every sentence conveys distinct routing or error information.

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?

Despite no output schema, the description enumerates the counts returned, so an agent knows what it gets back. With a single required param, full schema coverage, and annotations covering the safety profile, the only extra needed — the 403 error path — is present.

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 100% for the single sweepstakes_token parameter, which already documents it as a UUID v4 of an account-owned sweepstakes. The description adds no format or constraint detail beyond that, so the schema carries the load — baseline 3.

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 precise verb+resource ('Count the codes of a sweepstakes') and enumerates the exact buckets returned (total, assigned, unassigned, redeemed, voided, available). It also explicitly separates itself from the sibling fetch_codes, so an agent can route without opening either schema.

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?

Gives explicit when-to-use ('when the user asks "how many codes do I have left"') and names the alternative to avoid ('instead of paging through the list' / call this before fetch_codes). Nothing is left to inference.

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