Skip to main content
Glama

tokmeter_search

Read-only

Search individual API usage records by model substring, provider, project, date range, or cost bounds to investigate specific spikes or expensive calls.

Instructions

Find individual usage records — one per API response — matching a model substring, providers, project, date range and per-record cost bounds. Returns up to limit records (default 25), newest first unless sort_by says cost or tokens, each with time, provider, model, project, token buckets and cost. Use it to investigate a specific spike or an expensive call; for totals use tokmeter_pulse, for per-model or per-project rollups use tokmeter_models or tokmeter_projects. Records exist only while agents keep their transcripts, so the default (all) scope covers the last 14 days.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "tokmeter_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax records to return (default: 25)
modelNoFilter by model name substring
scopeNoTime scope: today, week (last 7d), month (calendar month), or all (default)
sinceNoStart date (YYYY-MM-DD) for custom date range
untilNoEnd date (YYYY-MM-DD) for custom date range
projectNoFilter by project name/path substring
sort_byNoSort by cost (desc), tokens (desc), or time (desc). Default: time
max_costNoMaximum cost per record (USD)
min_costNoMinimum cost per record (USD)
providersNoFilter to specific providers (e.g. ['claude-code','cursor'])

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.19.3

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint=false, but the description adds non-obvious behavior the schema cannot: default result ordering (newest first unless sort_by is cost or tokens), the default page size, and — most valuable — the retention caveat that records exist only while transcripts are kept, so 'all' effectively means the last 14 days. That retention note materially changes how an agent should interpret empty results. It stops short of describing truncation/pagination behavior when limit is hit, so not a 5.

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 sentences, front-loaded with the verb and resource, then output shape, then disambiguation against siblings. Dense but every clause carries information — the retention note in the final sentence is the only thing that could be called tangential, and it is genuinely load-bearing.

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?

With 10 optional parameters and no output schema, the description carries the burden of explaining the return shape and does so: each record includes time, provider, model, project, token buckets and cost, plus the cap and ordering. Combined with the sibling routing and retention window, an agent has everything needed to call it correctly and interpret the result.

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%, so every parameter including enums and bounds is already documented, making 3 the baseline. The description restates the filter dimensions and adds only a light gloss on sort_by ordering ('newest first unless sort_by says cost or tokens') and the limit default, both of which are already in the schema text. No filter interaction semantics (e.g. scope vs since/until precedence) are clarified.

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 specific verb and resource — 'Find individual usage records — one per API response' — and immediately enumerates the filterable dimensions, which pins down the granularity of the result (per-call, not aggregated). That granularity is exactly what separates it from the rollup siblings, so an agent can identify it without opening the 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 an explicit use case ('investigate a specific spike or an expensive call') and then routes to named alternatives with the condition that selects them: tokmeter_pulse for totals, tokmeter_models/tokmeter_projects for rollups. Both when-to-use and when-not-to-use are covered.

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