Skip to main content
Glama

Orchestrator Record Attempt

orchestrator_record_attempt

Count one failed stage attempt after a gate failure, then return attempts and should_retry so the autonomous loop can retry or escalate to human review.

Instructions

Count one failed attempt of a stage after a gate failure.

Use when: a stage gate failed in the autonomous loop; escalate with orchestrator_needs_human when should_retry is false. Returns: {ok, stage, attempts, should_retry}.

Input Schema

NameRequiredDescriptionDefault
stageYesPipeline stage id, e.g. 'aso', 'screenshots', 'features' (see pipeline_status for the list).
app_dirYesAbsolute path to the app project directory (contains app.spec.json), e.g. /Users/me/Apps/MyApp.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.5
    • addedInput schema / properties / app_dir / description
      Added value: +"Absolute path to the app project directory (contains app.spec.json), e.g. /Users/me/Apps/MyApp."
    • addedInput schema / properties / stage / description
      Added value: +"Pipeline stage id, e.g. 'aso', 'screenshots', 'features' (see pipeline_status for the list)."
  2. First observedv0.1.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, and destructiveHint=false, so the agent knows this is a non-idempotent, non-destructive write. The description adds the key behavioral fact that the return's should_retry field gates escalation to orchestrator_needs_human, which is meaningful state-machine context. It does not disclose where attempts are persisted or any retry threshold, but with annotations covering the safety profile the remaining gap is minor.

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 compact lines, front-loaded with the action, then clearly separated 'Use when' and 'Returns' blocks. Every sentence carries information an agent needs.

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?

An output schema exists, so the description needn't explain return values, yet it does anyway, and it supplies the escalation logic that makes the tool usable inside the loop. What's missing is any note on retry limits or where the attempt counter lives, but for a two-parameter bookkeeping tool this is close to complete.

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 both parameters (stage, app_dir) are already fully documented in the schema, including the example stage ids and the app.spec.json requirement. The description adds no parameter-level meaning beyond that, so the baseline 3 applies.

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?

States a specific verb and resource: 'Count one failed attempt of a stage after a gate failure,' which is far more than a restatement of the name. It also names a sibling (orchestrator_needs_human) as the escalation path, giving partial sibling differentiation, though it doesn't distinguish itself from other orchestrator_* bookkeeping tools like orchestrator_next_action or pipeline_mark.

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?

Explicit 'Use when' clause scopes it to a stage gate failure inside the autonomous loop, and the conditional escalation rule ('escalate with orchestrator_needs_human when should_retry is false') names the alternative and the exact condition that selects it. Nothing is left to inference.

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

Deploy Server

Other Tools