Skip to main content
Glama

Prepare: close a gAIX short through the pool

gaix_short_close
Read-onlyIdempotent

Unsigned transactions to close a gAIX short through Goldstein's pool (amount: gAIX to buy back, or all: true): the gAIX is bought with the USDG held, any shortfall from the wallet, and what is left comes back. Goes through while the hook takes at most 4%; over that, or for a sliver of debt, use gaix_short_close_in_kind. While the desk is paused a close is whole. Simulated from the wallet.

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": {
      "wallet": "<wallet>"
    },
    "name": "gaix_short_close"
  }
}

Input Schema

NameRequiredDescriptionDefault
allNotrue closes or takes out everything
amountNogAIX to buy back, as a decimal string
walletYesThe wallet's address (0x...); the transactions are built for it to sign

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint, idempotent, non-destructive), it discloses the funding waterfall: gAIX is bought with USDG held, any shortfall comes from the wallet, and the remainder returns. It also flags the 4% hook condition and that output is unsigned/simulated, which tells the agent the call itself is a safe read that produces transactions to sign.

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?

It is dense and front-loaded, leading with what the tool is and what it returns before the routing advice. Some clauses are clipped to the point of ambiguity ('a sliver of debt', 'while the desk is paused a close is whole'), which costs a little clarity but not much length.

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 3-parameter preparation tool with no output schema, the description covers what is produced (unsigned transactions for the given wallet to sign), how the position is funded, and when to use the alternative tool. Only the exact returned artifact shape and whether amount/all are hard-exclusive are left implicit.

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 100%, so the baseline is 3, but the description adds real meaning: amount is 'gAIX to buy back' and is presented as an alternative to all: true, which the schema does not state as a mutual exclusion. The wallet's role as the funding/signing address is also reinforced.

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?

The description opens with a specific verb+resource and mechanism: 'Unsigned transactions to close a gAIX short through Goldstein's pool', and immediately names the sibling it is not (gaix_short_close_in_kind). It is distinguishable from gaix_short_open, gaix_short_deposit and gaix_short_quote without opening any 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?

It gives an explicit routing condition: use this while the hook takes at most 4%, and switch to gaix_short_close_in_kind above that threshold or 'for a sliver of debt'. It also notes the desk-paused case. Both when-to-use and the named alternative are stated outright.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources