Skip to main content
Glama
Cohexa-ai

Agent Coherence — Stale Write Guard (FS)

Official
by Cohexa-ai

swg_accept

As the successor, accept the live handoff of a path without writing it: a pending handoff becomes completed (a write of the path completes it too). The giver stays fenced until a write moves the version.

Instructions

As the successor, accept the live handoff of a path without writing it: a pending handoff becomes completed (a write of the path completes it too). The giver stays fenced until a write moves the version. If another session has acquired the path and nothing has written it since, the handoff is overtaken but live: the accept is taken but changes nothing, answers status=overtaken and names that session as counterparty. Once a write has moved the version the handoff has ended, and the accept is refused handoff_not_live with the status saying how. Refused with handoff_not_successor or handoff_not_live, as an error that changes nothing (recover=stop_and_report, retryable=false, and a fixed next_step). A transfer fences the giver and does not reserve the path: other sessions keep reading and writing it by the ordinary rules, and the handoff only labels what they do. SINGLE-HOST only. Out of guarantee and NOT detected in v1: writers on different hosts or across a synced/network mount, divergent-history reconciliation, semantic correctness, server-enforced auto-merge.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.15.0

TDQS

A4/5.0
Behavior5/5

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

With only readOnlyHint=false from annotations, the description carries the behavioral load and does so richly: it explains the state transition (pending handoff becomes completed), the overtaken-but-live no-op case, the refusal codes, and the error shape (recover=stop_and_report, retryable=false, fixed next_step). It also discloses the single-host limitation and enumerates what is explicitly out of guarantee, which an agent cannot get from the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The primary action is front-loaded, which is good, but the body is a dense run-on chain of clauses joined by colons, dashes, and parentheticals that is hard to parse on first read. The closing laundry list of out-of-guarantee items is genuinely informative yet bloats an already heavy paragraph.

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 single-parameter mutation with no output schema, the description covers the outcomes an agent needs: success, overtaken no-op, and the two refusal codes with their error semantics and non-retryable status. The return payload structure is only gestured at via status names, but the behavioral picture is otherwise 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 coverage is 0% and the sole parameter 'path' has no schema description, so the description must compensate. It implies the path is the one whose live handoff is being accepted, but adds no syntax, format, or resolution detail (relative vs absolute, mount scoping) beyond that implication.

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: 'accept the live handoff of a path without writing it,' which pins down both the action and its non-obvious distinction from completing the handoff via a write. The core purpose is clear once parsed, but the surrounding jargon ('giver stays fenced', 'moves the version') assumes familiarity with the swg vocabulary and does not name the sibling it substitutes for (swg_write) explicitly.

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?

Gives concrete when-it-applies and when-not conditions: succeeds when a pending handoff is live, answers status=overtaken when another session has acquired but not written, and is refused handoff_not_live once a write has moved the version. It stops short of naming swg_write/swg_decline as explicit alternatives, so the routing is implied rather than spelled out.

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