Skip to main content
Glama
speedofred

io.github.speedofred/ami-survey

by speedofred

ami_survey_begin

Start an AMI survey after completing a workflow to measure its cost from session logs. Auto-detects runtime and window, and excludes survey token spend from measurements.

Instructions

Open an AMI survey for the workflow you have just completed. Detects the runtime, session and measurement window automatically, and adopts any stage markers you buffered with ami_mark_stage while working. Call this FIRST, after the workflow's real work is finished, so the survey's own token spend is excluded from the measurements.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoOptional working-directory override.
adapterNoForce a telemetry adapter instead of detecting the runtime. Rarely needed.
work_unitNoOptional, but declare it together with work_unit_count. The countable thing this workflow handled: 'ticket', 'CV', 'support email'. It is what cost and duration get divided by, so a workflow that did more work is not penalised for costing more.
session_idNoOptional session id override.
workflow_nameYesShort reusable label for the workflow, e.g. 'Support Ticket Triage & Response'.
transcript_pathNoOptional explicit transcript path override.
work_unit_countNoOptional, but declare it together with work_unit. How many work units this run actually handled - a whole number you can point at in the output, not an estimate.
workflow_categoryNoOptional. The workflow's category, from ami_get_workflow_categories. Decides which other workflows this run is compared against; an undeclared workflow is only ever compared against itself. Take it from the workflow's own workflow.json where one exists - do not invent one.
workflow_end_timeNoOptional ISO-8601 override for when the workflow ended.
workflow_start_timeNoOptional ISO-8601 override for when the workflow began. Defaults to the first human turn of this session.
workflow_descriptionYes1-3 sentences: what the workflow was given and what business work it produced. Minimum 20 characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it uses that space well: it discloses automatic runtime/session/window detection, adoption of buffered stage markers, and the token-spend exclusion. It does not cover repeated-call behavior or what a returned survey handle looks like, but the essential behavior is clear.

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, each earning its place: purpose, automatic behavior, and invocation timing/why. The key action and timing are front-loaded.

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 survey-begin tool with no output schema, the description gives enough to call it correctly: when to call it, what it auto-detects, and how it relates to ami_mark_stage. A short note on what the call returns would make it fully complete, but no critical invocation detail is missing.

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 the schema already documents all 11 parameters in detail. The description does not add extra parameter nuance, so the baseline of 3 is appropriate.

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?

The description opens with a specific verb and resource: 'Open an AMI survey for the workflow you have just completed.' It distinguishes this from sibling survey tools by calling it the FIRST step after the workflow's real work, which separates it from ami_submit_survey, ami_survey_status, and ami_get_survey.

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?

It gives an explicit positional instruction: 'Call this FIRST, after the workflow's real work is finished.' It also explains the measurement rationale (excluding the survey's own token spend). It does not name alternatives or list exclusion cases, so it falls just short of a 5.

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