Skip to main content
Glama
speedofred

io.github.speedofred/ami-survey

by speedofred

ami_mark_stage

Mark each workflow stage as you enter it to capture an accurate Agent Effort Profile. Close the final stage to prevent post-work from being attributed to it.

Instructions

Declare the workflow stage you are entering, e.g. 'Classify Severity' or 'Draft Customer Reply'. Call it as you move through the workflow to get a declared-stage Agent Effort Profile; without markers the profile falls back to AMI-observed execution phases. No survey run is needed first: markers emitted before ami_survey_begin are buffered with the timestamp you emitted them at and attached to the run when it opens. When the last stage is done, call once more with closes=true - each marker ends the stage before it, so without a closing one the final stage runs to the end of the measurement window and absorbs everything you do afterwards.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoOptional workspace override; buffered markers are adopted by a run opened in the same workspace.
noteNo
stageNoName of the stage being entered.
closesNoTrue to end declared work rather than start a stage. Call this when the final stage is complete, before you verify output or report back; work after it is attributed to observed phases instead of to a stage.
run_idNo
marked_atNoISO-8601; defaults to now.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description compensates by explaining important behavior: markers are buffered before a survey run exists, they are attached to runs in the same workspace, and an unclosed final stage absorbs subsequent work. This is substantial behavioral disclosure beyond a simple one-line purpose.

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?

The description is front-loaded with the tool's purpose and then covers invocation timing and closing behavior without fluff. The buffering sentence is long but still readable and every sentence contributes necessary usage information.

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?

The description covers the full intended lifecycle—opening, buffering, workspace adoption, and closing—and explains the main pitfall of forgetting to close the final stage. Minor gaps around note and run_id remain, but they are not essential for correct selection and basic invocation.

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?

The schema covers 4 of 6 parameters, and the description adds meaningful semantics for stage and closes, including lifecycle edge cases. However, note and run_id remain essentially undocumented, and the connection between cwd and buffered markers is only implied.

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 clearly states the tool's purpose—'Declare the workflow stage you are entering'—with concrete examples and ties it to the Agent Effort Profile. It is distinct from sibling tools like ami_survey_begin or ami_record_calls by focusing on stage markers.

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 explicit guidance on when to call the tool ('as you move through the workflow'), when it can be called relative to ami_survey_begin, and how to close the final stage with closes=true. It does not explicitly name alternative tools or say when not to use it, but the workflow context is clear.

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