Skip to main content
Glama
Agent Coherence — Stale Write Guard (FS)

Agent Coherence — Stale Write Guard (FS)

Official
by Cohexa-ai

swg_reacquire

Recover from a stale-view write denial by re-minting session identity and returning the current file bytes, then retry the write from that exact version.

Instructions

Recover from a stale_view deny: re-mint identity and return the CURRENT bytes. You MUST write FROM these exact bytes — the server enforces version lineage, NOT that your content was derived from what you read. It is also the step a swg_write refusal names with recover=reacquire or wait_then_reacquire. The re-mint drops every hold this session has: the write grant on every path, not only this one, so other agents can then write those paths. To give back one path and keep the others, use swg_release. 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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "swg_reacquire"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A4.3/5.0
Behavior4/5

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

With only readOnlyHint=false supplied, the description carries real weight and delivers: it discloses that the re-mint drops every write grant this session holds across all paths (freeing them for other agents), states the version-lineage enforcement constraint on subsequent writes, and scopes the guarantee to a single host while listing what is not detected in v1. What it lacks is failure behavior (e.g., what happens if no hold or path exists), which keeps it from a 5.

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 primary action and the hard 'write FROM these exact bytes' constraint, then the effect, then the sibling alternative, then scope limits. Dense but every clause carries information; the out-of-guarantee enumeration is long though relevant.

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?

A mutation tool with no output schema, yet the description explains what is returned (the CURRENT bytes), the side effects on holds, the host restriction, and the version-lineage requirement. Enough for correct invocation, with minor gaps around error conditions and the exact meaning of path.

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 single 'path' property has no description, so the description must compensate. It implies path is the denied path whose current bytes are returned, but never explicitly defines the parameter's semantics (e.g., whether it must be the path from the deny, or what form it takes).

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 action: recover from a stale_view deny by re-minting identity and returning the CURRENT bytes. It explicitly contrasts itself with swg_release ('To give back one path and keep the others, use swg_release'), so an agent can separate it from that sibling without opening either schema.

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?

Names the exact trigger conditions: a stale_view deny, or a swg_write refusal carrying recover=reacquire or wait_then_reacquire. It also gives the exclusion rule — use swg_release when you want to drop a single path's hold rather than all of them.

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