Skip to main content
Glama

resolve

DestructiveIdempotent

Settle a DIVERGED item by naming the surviving revision hash in keep and every other current head in discard. Fails if any head is omitted.

Instructions

Code lane: settles an item with more than one current head - what get reports as DIVERGED, from two machines revising the same fact apart. Read history first; never guess which head is real. Name the surviving revision hash in keep and every other current head in discard - leaving one out fails rather than silently discarding it. On a replica this queues instead of writing ('queued for the main machine' is not an error). The head set is rechecked under the write lock, so a head that appears mid-decision fails the call loudly instead of being dropped. Replies 'resolved onto (event seq N)', or the refusal text.

Input Schema

NameRequiredDescriptionDefault
idYesThe diverged id.
keepYesThe revision hash that survives.
discardYesEvery other current head, in full. Leaving one out fails rather than silently discarding it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already mark this destructive, idempotent, and non-open-world, and the description goes well beyond them: replica runs queue rather than write ('queued for the main machine' is not an error), the head set is rechecked under the write lock so a mid-decision head fails loudly, and the exact success reply format is given. No contradiction with the destructiveHint=true annotation.

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?

Front-loaded with the 'Code lane: settles...' purpose, then the procedure, then edge cases and the reply format — a logical order with no filler sentences. It is dense and slightly jargon-heavy ('Code lane', 'event seq N'), but every sentence carries distinct operational information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description compensates by specifying the return string ('resolved <id> onto <keep> (event seq N)') and the refusal text. Combined with replica-queueing and lock-recheck semantics, an agent has everything needed to call this safely and interpret the result.

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 baseline is 3, and the description's parameter content ('surviving revision hash in keep', 'every other current head in discard', 'leaving one out fails') largely restates what the schema already says verbatim. It adds the procedural hint to consult history first, but little syntax or format detail beyond the schema.

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?

States a specific verb and resource — settles an item with more than one current head — and names the exact condition it targets ('what get reports as DIVERGED'). This distinguishes it cleanly from siblings like get (reads state), revise (moves a head), and history (which it defers to), so an agent can route without opening schemas.

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?

Explicitly gates usage on get reporting DIVERGED, commands 'Read history first; never guess which head is real,' and warns that omitting a head fails rather than silently discarding. It names the prerequisite tool (history), the trigger condition, and the exclusion behavior — 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.