Skip to main content
Glama

Usage reconciliation

spicrawl_usage_reconciliation
Read-onlyIdempotent

Drift report for ONE day: re-derives usage from that day's request log and compares it with the billed daily rollup, so you can see whether the rollup missed or double-counted anything. Defaults to yesterday (UTC); today is still accumulating and would always show drift. Requires the read scope.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dayNoThe UTC day to reconcile, YYYY-MM-DD. Default: yesterday.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dayNoThe UTC day reconciled.
driftNoDisagreements; empty means no drift.
warningsNoCaveats the numbers would otherwise hide.
repairableNoAlways false; nothing is repaired.
interpretationNoWhat the drift can and cannot prove. Read it before acting on drift.
request_log_rowsNoRows in the request log for the day; 0 means there was nothing to compare against.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "day": {
      +      "description": "The UTC day reconciled.",
      +      "type": "string"
      +    },
      +    "drift": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "additionalProperties": true,
      +            "properties": {
      +              "action": {
      +                "description": "The verdict: missing_in_usage_daily, absent_from_request_log, undercounted or overcounted.",
      +                "type": "string"
      +              },
      +              "delta": {
      +                "type": "number"
      +              },
      +              "metric": {
      +                "type": "string"
      +              },
      +              "observed_qty": {
      +                "description": "The quantity re-derived from the request log.",
      +                "type": "number"
      +              },
      +              "project_id": {
      +                "type": "string"
      +              },
      +              "stored_qty": {
      +                "description": "The billed quantity.",
      +                "type": "number"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Disagreements; empty means no drift."
      +    },
      +    "interpretation": {
      +      "description": "What the drift can and cannot prove. Read it before acting on drift.",
      +      "type": "string"
      +    },
      +    "repairable": {
      +      "description": "Always false; nothing is repaired.",
      +      "type": "boolean"
      +    },
      +    "request_log_rows": {
      +      "description": "Rows in the request log for the day; 0 means there was nothing to compare against.",
      +      "type": "number"
      +    },
      +    "warnings": {
      +      "description": "Caveats the numbers would otherwise hide.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so safety is covered. The description adds genuinely non-derivable context: the required `read` scope and the reason for the yesterday default (today's rollup is still accumulating), which is exactly the kind of behavioral detail annotations cannot carry.

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, no filler. The core behavior is front-loaded and the operational caveats (default, today's instability, required scope) follow in a single compact clause.

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 an output schema present, return values need no explanation, and the description covers scope, defaulting and auth. The only gap is operational cost: re-deriving a full day from the request log may be expensive or slow, and nothing here warns about that.

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 100% and the single `day` parameter is fully documented there, so the baseline is 3. The description goes slightly beyond by justifying the default (yesterday, because today always shows drift), which helps an agent decide whether to pass the parameter at all.

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?

Names a specific verb and resource ('re-derives usage from that day's request log and compares it with the billed daily rollup') and scopes it to ONE day, which separates it in an agent's mind from the raw-usage siblings spicrawl_usage and spicrawl_usage_summary. The 'drift report' framing makes the output intent unambiguous.

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?

States when the tool applies (a settled UTC day) and effectively excludes one case: 'today is still accumulating and would always show drift.' It never names the sibling alternatives (spicrawl_usage, spicrawl_usage_summary) that an agent might reach for instead, so routing is implied rather than explicit.

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