Skip to main content
Glama

tokmeter_anomaly

Read-only

Detect unusual token spending and usage anomalies, including cost spikes, sudden model switches, and abnormally large requests, to catch runaway costs and unexpected usage.

Instructions

Detect unusual spending patterns and anomalies in token usage. Identifies days or sessions with cost spikes, sudden model switches, abnormally large requests, and deviation from historical averages. Use this to catch runaway costs or unexpected usage.

Input Schema

NameRequiredDescriptionDefault
scopeNoTime scope: today, week (last 7d), month (calendar month), or all (default)
projectNoFilter by project name/path substring
providersNoFilter to specific providers (e.g. ['claude-code','cursor'])
sensitivityNoAnomaly detection sensitivity (default: medium)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.19.3

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds useful context by naming the anomaly types it detects, but says nothing about output format, thresholds, or how the sensitivity level changes results. With annotations carrying the safety profile, this is an adequate but not rich disclosure.

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?

Three sentences, front-loaded with purpose then detection scope then usage, with no filler. Minor redundancy between 'unusual spending patterns' and 'anomalies' keeps it from being maximally tight.

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 zero-required-parameter, read-only analysis tool, the description covers intent and anomaly coverage. With no output schema, however, it leaves the return shape (findings per day/session, severity, counts) entirely unspecified, which is a real gap for an agent deciding whether the result answers its question.

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%, with every parameter (scope, project, providers, sensitivity) documented in the schema itself. The description adds no parameter-level detail such as how sensitivity interacts with detected anomalies, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Detect unusual spending patterns and anomalies in token usage') and enumerates the concrete anomaly classes it finds (cost spikes, model switches, oversized requests, deviation from averages). This distinguishes it from sibling analysis tools like tokmeter_forecast or tokmeter_pulse, though it does not name those siblings explicitly.

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?

'Use this to catch runaway costs or unexpected usage' gives a clear triggering context for calling the tool. It stops short of stating when not to use it or pointing at alternatives such as tokmeter_budget_alert or tokmeter_forecast, so it does not reach the top of the scale.

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