Skip to main content
Glama

Odyssey Loopr

Build open

build_open
Read-only

Build the steps that open a leveraged position. 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.
amountYesCollateral (or tokenIn) amount in base units
chainIdYesEVM chain id
tokenInNo
leverageYesTarget leverage as a plain number between 1.01 and 100: 3 means 3x (not 1e18 fixed-point). An open must borrow, so 1 is not accepted; to add collateral without borrowing, adjust an existing position
slippageNoSlippage tolerance as a decimal: 0.005 means 0.5% (not 1e18 fixed-point)
strategyIdYesStrategy id from list_strategies (`strategyId`)
borrowTokenYes
approvalModeNoERC-20 approval size. 'exact' (default) approves only this amount
forceSwapperNoRetry only: route the swap through the swapper instead of the routing engine. Set it when simulate reports a build as failing, then rebuild.
maxPriceImpactNoZap-in only: decimal price-impact ceiling (0.1 = 10%)
tokenInSwapperNo
collateralTokenYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare readOnlyHint=true and idempotentHint=false; the description is consistent, explaining the server holds no keys and sends nothing, and that builds are single-use so replaying predicts a different position address. It adds behavior beyond the annotations: the 180-second expiry via `expiresAt`, the 422 `simulation_reverted` for zap-ins, and the 422 `insufficient_balance` payload shape.

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 core purpose and the safety-critical constraint (expiry, single-use, simulate before signing) are front-loaded and each sentence carries operational information. It is dense and long, and the error-code sentences could be trimmed slightly, but little is wasted.

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 13-parameter, 7-required mutation builder with no output schema, the description covers return semantics (unsigned steps), lifetime, replay hazards, simulation guidance, and two error codes. Some lower-traffic parameters and the `expiresAt`/steps output shape are left implicit, but nothing critical for correct invocation is missing.

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?

With 69% schema coverage, the schema documents most parameters, but the description adds real meaning for `tokenIn` (build-only zap-in, amount switches to tokenIn decimals, simulated by the build) and clarifies the leverage/borrow constraint. It leaves `tokenInSwapper`, `borrowToken`, `collateralToken`, and slippage defaults to the schema, so it is strong but not exhaustive.

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 open a leveraged position', and immediately clarifies the output is UNSIGNED transaction steps. It distinguishes itself from build_adjust by noting that adding collateral without borrowing belongs to adjust, so an agent can route correctly among the build_* siblings.

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 rules: build immediately before signing (180s expiry), never replay a build, and pass `steps` to `simulate` and check `ok` before requesting a signature. It also names the alternative path (adjust an existing position for non-borrowing collateral adds) and explains the zap-in path via `tokenIn`.

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