Skip to main content
Glama
ODATANO

@odatano/nightgate-mcp

Official
by ODATANO

revert_swap_offer

Release coins locked by an unused swap half so the wallet can spend them again. Cancel a posted board offer by offerId or an unlisted half by id before its swap lands.

Instructions

Release the coins of a swap half this wallet built (build_swap_offer, take_swap_offer or send_token) that is not going to be used. Until then, or until the swap lands, the coins count as spent in this wallet. By id for a half listed by get_swap_wallet, also one restored from an earlier process; by offerId for a board offer this wallet posted, from the board's copy of the half, which works after a restart and needs the offer closed (expired or retired; retire_swap_offer first while it is open). It does not recall an offer somebody already holds: to make a published offer worthless, spend its coins in another swap. A half whose swap landed leaves the list; its coins are spent.

Input Schema

NameRequiredDescriptionDefault
idNo
offerIdNoThe board entry, instead of id

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.21.0
    • addedInput schema / properties / offerId
      Added value: +{
      +  "description": "The board entry, instead of id",
      +  "format": "uuid",
      +  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "id"
      -]
  2. Addedv0.18.3

TDQS

A4.5/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden and mostly meets it: it discloses the intermediate state ('coins count as spent in this wallet'), the terminal state ('a half whose swap landed leaves the list; its coins are spent'), the hard limit on cancellation (cannot recall a held offer), and the restart-survival property of the offerId path. It does not mention permissions, failure modes, or what the call returns, which keeps it short of 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?

The critical action and its constraint are front-loaded, and every sentence carries non-redundant information. It is dense and the first sentence is long with an interleaved parenthetical tool list, which costs some readability, but nothing is padding.

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?

With no annotations, no output schema and an optional-parameter schema, the description covers state effects, prerequisites, restart behavior and the primary failure case, which is what an agent needs. The remaining omissions — return value shape and the required-one-of rule for id/offerId — are the only things left unclear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 50% (only offerId is documented in-schema), but the description more than compensates by explaining what each selector targets — 'By id for a half listed by get_swap_wallet, also one restored from an earlier process' and 'by offerId for a board offer this wallet posted, from the board's copy of the half'. The one gap is that neither the schema nor the description states whether the two are mutually exclusive or what happens if both or neither are supplied.

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?

Opens with a specific verb+resource: 'Release the coins of a swap half this wallet built', and immediately names the sibling tools that produce such a half (build_swap_offer, take_swap_offer, send_token). It also distinguishes itself from retire_swap_offer by explaining that retirement is a prerequisite for one of the two cases, so an agent can route correctly without opening a 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?

Gives explicit when-to-use (a half that will not be used), the two selection paths with the alternative named in each case (by id for get_swap_wallet halves; by offerId for board offers), the prerequisite for the board case (offer must be closed; retire_swap_offer first while open), and an explicit when-NOT-to-use with the recommended alternative ('does not recall an offer somebody already holds: ... spend its coins in another swap').

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