Skip to main content
Glama

Odyssey Loopr

Build close

build_close
Read-only

Build the steps that close a position in full. Returns UNSIGNED transaction steps for the owner to sign in order; this server never holds keys or sends transactions. The build expires after 180 seconds (expiresAt, unix ms): build immediately before signing, not as a plan for later. Builds are single-use: rebuilding an open predicts a different position address, so never replay one. A successful build does not guarantee a successful transaction: pass steps to simulate and check ok before asking anyone to sign.

Input Schema

NameRequiredDescriptionDefault
ownerYesEOA that owns the position and signs the steps. The smart account is derived from it server-side.
chainIdYesEVM chain id
slippageNoSlippage tolerance as a decimal: 0.005 means 0.5% (not 1e18 fixed-point)
strategyIdYesStrategy id from list_strategies (`strategyId`)
forceSwapperNoRetry only: route the swap through the swapper instead of the routing engine. Set it when simulate reports a build as failing, then rebuild.
receiveTokenNoToken to receive (defaults to the deposit token)
positionAddressYesPosition (vault) address

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Discloses traits annotations cannot express: unsigned output only, server never holds keys or sends transactions, 180-second expiry with the expiresAt field, single-use builds, and no guarantee of on-chain success. This aligns with idempotentHint=false; readOnlyHint=true is consistent since the server only constructs payloads. A minor gap is that it does not state auth/permission requirements for the owner.

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?

Four sentences, front-loaded with the action, each carrying a distinct constraint (custody, expiry, single-use, simulate-first). Dense but no filler, though the parenthetical expiresAt note slightly crowds the expiry sentence.

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?

No output schema exists, and the description compensates by naming the returned steps and expiresAt field plus the simulate handoff. It is nearly complete for a build tool; what remains thin is guidance on quote_close vs build_close and any permission prerequisites for the signing owner.

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 100%, so the schema already documents owner, chainId, slippage, strategyId, forceSwapper, receiveToken, and positionAddress. The description adds no parameter-level meaning beyond the schema, so the baseline 3 applies. Its value instead lands in output/behavior explanation.

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 ('Build the steps that close a position in full'), and the 'in full' qualifier separates it from partial-exit siblings like build_adjust. Combined with the sibling list (quote_close, build_open), an agent can tell immediately which tool produces a full close.

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 strong sequencing guidance: build immediately before signing rather than treating it as a plan, rebuild rather than replay, and pass steps to simulate before requesting signatures. It does not explicitly compare against quote_close or explain when to quote vs build, which is the main remaining routing gap.

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