Skip to main content
Glama

Prepare: Open a loop

gage_prepare_leverage

Prepare a leveraged loop: the loan buys more of the pledged token in one transaction. USDG only. Refused above maxCostBps. Returns the next unsigned transaction and a review link; never signs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownYesThe tokens you put in, raw units
termYesLoan term in seconds, one of the terms gage_capabilities lists
tokenYes
walletYes
multipleYesLeverage, 1.1 to 3 with at most two decimals (2 = twice the pledge held for the loan)
lendAssetNoUSDG only: leverage lends USDG (a loop in a lend asset is refused)
maxCostBpsYesHighest loan cost you accept, bps of the amount borrowed; the loop is refused above it

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already flag a non-idempotent write to an open world, and the description adds genuinely new behavioral context: it returns an unsigned transaction plus a review link and 'never signs,' and it discloses the maxCostBps refusal condition. Non-reversibility is not stated, but the signing/return behavior is the key disclosure an agent needs.

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?

Three tight sentences, no filler, with the core action and the strongest constraint (USDG only) front-loaded. Every clause carries information.

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 7-parameter (6 required) mutation tool with no output schema, the description covers cost bounds, the single supported lend asset, and the return shape and signing behavior. Wallet/token selection and term sourcing are left to the schema, which handles them adequately.

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 71%, above the midpoint, so the parameter burden mostly rests on the schema. The description's 'USDG only' and maxCostBps refusal language largely restates the schema's own lendAsset and maxCostBps descriptions, adding only marginal meaning over structured data.

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?

States a specific verb (prepare) and resource (leveraged loop) and explains the mechanism: 'the loan buys more of the pledged token in one transaction.' This separates it conceptually from gage_prepare_borrow, but it never names the sibling it is distinguished from, so an agent must still infer the boundary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives real constraints ('USDG only', 'Refused above maxCostBps') that govern invocation, but does not say when to reach for this versus gage_leverage_quote or gage_prepare_borrow. Usage is implied by the loop description rather than stated.

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