Skip to main content
Glama

Odyssey Loopr

Build adjust

build_adjust
Read-only

Build the steps that add collateral ('push': requires collateralToken, amount, borrowToken, leverage) or withdraw it ('pull': requires token, tokenOut, and exactly one of withdrawAmount or withdrawAll). Fields of the other direction are refused, not ignored. 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. tokenIn (zap-in) is build-only: quote in the collateral token, then set tokenIn here to add the swap. With tokenIn set, amount is in tokenIn decimals. A zap-in is simulated by the build itself, and a failure gets 422 simulation_reverted. Any build the owner funds (open, adjust push, manual repay), zap-in or not, gets 422 insufficient_balance (token, required, available) when the owner holds less than it pulls.

Input Schema

NameRequiredDescriptionDefault
ownerYesEOA that owns the position and signs the steps. The smart account is derived from it server-side.
tokenNo'pull': position collateral token
amountNo'push' only: amount to add
chainIdYesEVM chain id
tokenInNo'push' only
leverageNoTarget leverage as a plain number between 1 and 100: 3 means 3x (not 1e18 fixed-point)
slippageNoSlippage tolerance as a decimal: 0.005 means 0.5% (not 1e18 fixed-point)
tokenOutNo'pull': token to receive
directionYes
strategyIdYesStrategy id from list_strategies (`strategyId`)
borrowTokenNo'push' only
withdrawAllNo'pull' only
approvalModeNo'push' only
forceSwapperNo'push' only. Retry only: route the swap through the swapper instead of the routing engine. Set it when simulate reports a build as failing, then rebuild.
maxPriceImpactNo'push' zap-in only: decimal price-impact ceiling
tokenInSwapperNo'push' only
withdrawAmountNo'pull' only: collateral to withdraw, in base units
collateralTokenNo'push' only
positionAddressYesPosition (vault) address

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: the server never holds keys or sends transactions, the build expires after 180 seconds via `expiresAt`, builds are single-use, and specific 422 outcomes (`simulation_reverted`, `insufficient_balance` with token/required/available) are disclosed. These are consistent with readOnlyHint=true (nothing is written; the owner signs) and idempotentHint=false (a rebuild produces a different address), so there is no annotation contradiction.

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

Conciseness5/5

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

Despite its length, every sentence carries distinct operational value — mode requirements, custody model, expiry, single-use constraint, simulation gate, zap-in semantics, and error codes. It is front-loaded with the core purpose before the safety caveats, so an agent gets the essentials from the opening clause.

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 19-parameter tool with no output schema, it covers the critical gaps: it names `steps` and `expiresAt` in the return, explains the two-direction field discipline, and flags the zap-in denomination change. It does not describe slippage, approvalMode, or maxPriceImpact defaults beyond what the schema states, but those are adequately covered at 95% schema coverage.

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 already 95%, so the baseline is 3, but the description adds real meaning: fields of the opposite direction are refused rather than ignored, exactly one of withdrawAmount/withdrawAll must be supplied on pull, and with `tokenIn` set the `amount` is denominated in `tokenIn` decimals. That last point is a subtlety the schema alone does not convey.

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?

The first sentence names a specific verb (build) and resource (adjustment steps) and splits the two modes with their required fields: push needs collateralToken/amount/borrowToken/leverage, pull needs token/tokenOut plus one of withdrawAmount/withdrawAll. It is unambiguous what the tool produces (unsigned transaction steps). It never names the sibling it supersedes or pairs with (build_open vs build_adjust, quote_adjust), leaving sibling separation implicit.

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?

Strong when-to-use guidance: build immediately before signing rather than as a plan, never replay a build, and pass `steps` to `simulate` and check `ok` before asking for a signature. It also gives a retry path via `forceSwapper` when simulation fails. It stops short of naming `quote_adjust` as the tool to use when the owner is still deciding, which is the natural alternative given the sibling list.

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