Skip to main content
Glama
speedofred

io.github.speedofred/ami-survey

by speedofred

ami_record_calls

Log completed API call records with model, timestamps, and token counts to measure agent workflow costs for the AMI survey.

Instructions

Telemetry entry point for agents NOT running in Claude Code. Post the provider-reported usage for each API call the workflow made. Every record needs model, start_time, end_time, input_tokens, output_tokens - values read from real API responses, never estimated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
callsYesCall records.
run_idNo
adapterNoName of the runtime/SDK the records came from.
replaceNo
runtime_metadataNoe.g. {platform, runtime, version}.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It does add a strong data-quality rule: 'values read from real API responses, never estimated.' Yet it doesn't disclose the nature of the write (post) or side effects, what replace means, whether this is append-only, or any auth/rate-limit implications. It's not misleading, but the description only partially covers behavioral transparency.

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 with zero filler. The scoping ('agents NOT running in Claude Code') is front-loaded, the purpose ('post usage') is explicit, and the data-quality rule ('never estimated') earns its place. This is an efficiently structured description.

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?

The tool has 5 parameters, a nested object, no output schema, and no annotations, so the description must carry more explanatory weight. It provides the required-field rule and sourcing constraint, but leaves the replace parameter's semantics unexplained, never hints whether records append or overwrite, and does not clarify what the tool returns or whether the call is idempotent. These gaps make it adequate but incomplete for an agent to use confidently without more context.

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 60% (6 out of 10 properties have descriptions, but several important ones like replace, run_id, and some fields inside nested objects lack descriptions). The description adds 'never estimated' semantic guidance for input_tokens/output_tokens, but doesn't explain replace, run_id, or how these interact. It does not fully compensate for the uncovered schema areas, but the baseline 3 is appropriate given partial coverage.

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 ('post') and resource ('provider-reported usage for each API call'), and claims an explicit scope ('agents NOT running in Claude Code'). It does not name a sibling alternative (e.g., ami_collect_telemetry) but the distinction is understandable in context.

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?

The description gives a clear when-to-use condition: agents NOT running in Claude Code. This effectively says 'when you're not in Claude Code, use this,' though it does not explicitly name the alternative/does-not-use case (e.g., Claude Code agents should use something else). It provides a meaningful exclusion but not explicit sibling routing.

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