Skip to main content
Glama
speedofred

io.github.speedofred/ami-survey

by speedofred

ami_collect_telemetry

Collects telemetry from agent runtime call records, attributing token usage, model, and timings to workflow stages, then stores the results on the run for cost measurement.

Instructions

Measure the workflow run: detects which agent runtime you are in, reads that runtime's own call records (token usage, model, timings reported by the provider), attributes each call to a stage or observed execution phase, and stores the result on the run. Returns the collected inventory fields. Use these numbers verbatim. If your runtime has no adapter, this says so and you should use ami_record_calls instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo
run_idNoDefaults to the active run.
adapterNoForce a telemetry adapter instead of detecting the runtime. Rarely needed.
session_idNo
window_endNoISO-8601 override.
window_startNoISO-8601 override.
transcript_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With zero annotations, the description carries the full burden, and it does decent work: it discloses the persistence side effect ("stores the result on the run"), the graceful no-adapter failure mode, and the verbatim-numbers rule. But it never states re-invocation semantics (overwrite vs. append), what happens with partial/empty records, or any permission requirements — notable gaps for a tool that writes state.

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?

Four sentences, roughly 70 words, with the purpose front-loaded and the fallback instruction last. Every sentence earns its place; the terse operational directive "Use these numbers verbatim" adds real value without bloat.

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?

For a 7-param tool with no annotations and no output schema, the description covers the essentials: purpose, mechanism, persistence side effect, return value ("collected inventory fields"), and the adapter fallback. It falls short only on re-invocation behavior and workflow timing, which are refinement-level rather than call-blocking details.

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 coverage is 57% (4/7 params documented; cwd, session_id, transcript_path have no descriptions). The description adds useful context — the runtime-detection mechanism clarifies the 'adapter' param, and the provider-reported records (token usage, model, timings) give meaning to the ISO-8601 window overrides — but it never explicitly explains the three undocumented parameters.

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?

"Measure the workflow run" states a specific verb plus resource, then elaborates the mechanism (detect runtime, read provider call records, attribute to stages, store on run, return inventory). It explicitly names ami_record_calls as the fallback alternative, cleanly distinguishing itself from the closest sibling among 13 tools.

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 final sentence gives an explicit conditional: "If your runtime has no adapter, this says so and you should use ami_record_calls instead" — naming the exact alternative and the condition that selects it. However, it doesn't clarify workflow ordering relative to stage-marking siblings like ami_mark_stage, nor give broader when-not-to-use guidance.

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