Skip to main content
Glama

Plan an exit, a rule, a hand-over or a delegation on a ladder

plan_ladder_action
Read-onlyIdempotent

Plans one action on a ladder the wallet owns (or is the delegate of) and returns the unsigned transaction. Use after my_ladders. action: collect pays the fees earned and leaves the ladder working; close_part takes sharePct of every rung out; close pays the fees and returns everything (and cancels a limit order); take_nfts hands the Uniswap position NFTs to the owner, paused or not, for 5% of the ladder's value; close_once_filled sets or clears a limit order's fill rule; give hands the ladder to another wallet as it is, final; delegate lets a wallet run it within perms, every payout still to the owner. Returns: transactions[] (to, data, value in wei, gas), check (simulated, ok, failedStep, reason, ethNeeded, ethHeld), sendWithin, ifItReverts, slippagePct, expected amounts for a close, gainCut where a share of a gain applies (ladders opened before 30 September 2026). Behavior: read-only on our side; nothing is signed or sent. The plan is laid out from the chain at this block and simulated from the owner; send it within check.sendWithin, and plan again rather than resend one that reverted. Costs quota units (agent_quota). Errors: refused when the ladder is not the owner's, is closed, the action does not fit (a filled order cannot take the rule), or the delegate lacks the permission.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
onNoclose_once_filled only: true sets the rule (default), false clears it.
toNoWhere the proceeds go; the owner when left out. For give: the wallet that receives the ladder.
whoNodelegate only: the wallet that may run the ladder.
actorNoThe wallet that will send the transaction when it is the ladder's delegate, not its owner. It must hold the permission; the proceeds go to the owner.
ownerYesThe ladder's owner.
permsNodelegate only: permissions summed: 1 add, 2 remove (close, close part, take the NFTs, all paid to the owner), 4 collect (to the owner), 8 rules (autopilot, compounding). 0 ends the delegation.
actionYesWhat to do: collect, close_part, close, take_nfts, close_once_filled, give, delegate.
contractNoThe LoomLadder the ladder lives in, from my_ladders. Left out: the current one.
ladderIdYesThe ladder's id, from my_ladders.
sharePctNoclose_part only: the share of every rung to take out, 1 to 99.
slippagePctNoclose and close_part: room for the price to move, in percent; sets the minimums. Left out: from the pool's recent moves.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • addedInput schema / properties / action / description
      Added value: +"What to do: collect, close_part, close, take_nfts, close_once_filled, give, delegate."
    • changedInput schema / properties / actor / description
      Previous value: -"The wallet that will send it, when it is the ladder's delegate and not its owner: it must hold the permission, and the proceeds go to the owner"New value: +"The wallet that will send the transaction when it is the ladder's delegate, not its owner. It must hold the permission; the proceeds go to the owner."
    • changedInput schema / properties / contract / description
      Previous value: -"The LoomLadder the ladder lives in, from my_ladders; the current one when left out"New value: +"The LoomLadder the ladder lives in, from my_ladders. Left out: the current one."
    • addedInput schema / properties / ladderId / description
      Added value: +"The ladder's id, from my_ladders."
    • changedInput schema / properties / on / description
      Previous value: -"close_once_filled only: false clears the rule"New value: +"close_once_filled only: true sets the rule (default), false clears it."
    • addedInput schema / properties / owner / description
      Added value: +"The ladder's owner."
    • changedInput schema / properties / perms / description
      Previous value: -"delegate: the permissions summed: 1 add, 2 remove (close, close part, take the NFTs, all to the owner), 4 collect (to the owner), 8 rules (autopilot, compounding); 0 ends the delegation"New value: +"delegate only: permissions summed: 1 add, 2 remove (close, close part, take the NFTs, all paid to the owner), 4 collect (to the owner), 8 rules (autopilot, compounding). 0 ends the delegation."
    • addedInput schema / properties / sharePct / description
      Added value: +"close_part only: the share of every rung to take out, 1 to 99."
    • addedInput schema / properties / slippagePct / description
      Added value: +"close and close_part: room for the price to move, in percent; sets the minimums. Left out: from the pool's recent moves."
    • changedInput schema / properties / to / description
      Previous value: -"Where the proceeds go; the owner when left out. give: the wallet that gets the ladder"New value: +"Where the proceeds go; the owner when left out. For give: the wallet that receives the ladder."
    • changedInput schema / properties / who / description
      Previous value: -"delegate: the wallet that may run the ladder"New value: +"delegate only: the wallet that may run the ladder."
  2. Changed5 schema fields changed
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "collect",
      -  "close_part",
      -  "close",
      -  "take_nfts",
      -  "close_once_filled"
      -]New value: +[
      +  "collect",
      +  "close_part",
      +  "close",
      +  "take_nfts",
      +  "close_once_filled",
      +  "give",
      +  "delegate"
      +]
    • addedInput schema / properties / actor
      Added value: +{
      +  "description": "The wallet that will send it, when it is the ladder's delegate and not its owner: it must hold the permission, and the proceeds go to the owner",
      +  "pattern": "^0x[0-9a-fA-F]{40}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / perms
      Added value: +{
      +  "description": "delegate: the permissions summed: 1 add, 2 remove (close, close part, take the NFTs, all to the owner), 4 collect (to the owner), 8 rules (autopilot, compounding); 0 ends the delegation",
      +  "maximum": 15,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedInput schema / properties / to / description
      Previous value: -"Where the proceeds go; the owner when left out"New value: +"Where the proceeds go; the owner when left out. give: the wallet that gets the ladder"
    • addedInput schema / properties / who
      Added value: +{
      +  "description": "delegate: the wallet that may run the ladder",
      +  "pattern": "^0x[0-9a-fA-F]{40}$",
      +  "type": "string"
      +}
  3. Changed2 schema fields changed
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "collect",
      -  "close_part",
      -  "close",
      -  "take_nfts"
      -]New value: +[
      +  "collect",
      +  "close_part",
      +  "close",
      +  "take_nfts",
      +  "close_once_filled"
      +]
    • addedInput schema / properties / on
      Added value: +{
      +  "description": "close_once_filled only: false clears the rule",
      +  "type": "boolean"
      +}
  4. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations' readOnly/idempotent hints, it discloses that the plan is built 'from the chain at this block and simulated from the owner', that the caller must 'send it within check.sendWithin', that a reverted plan should be re-planned, and that it 'costs quota units (agent_quota)'. It also lists the precise refusal conditions (not owner, closed ladder, action doesn't fit, delegate lacks permission) – rich disclosure fully consistent with readOnlyHint=true.

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?

Front-loaded with purpose, then sequenced sections (Use after, action breakdown, Returns, Behavior, Errors) that are easy to scan. It is dense and long, but nearly every clause carries decision-relevant content, so little is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter, no-output-schema tool this is thorough: it explains the return payload (transactions[], check with ok/failedStep/reason/ethNeeded, sendWithin, ifItReverts, slippagePct, expected amounts, gainCut), error/refusal conditions, quota cost, and simulation semantics. Nothing an agent needs to call it correctly appears 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?

Schema coverage is 100%, so the per-parameter descriptions already carry most semantics, but the description adds real meaning the schema lacks – the effect of each action enum value, the '5% of the ladder's value' cost of take_nfts, the 'final' nature of give, and what sharePct/slippagePct actually drive in a close.

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 ('Plans one action on a ladder...returns the unsigned transaction') and explicitly enumerates all seven action values with distinct semantics. It also positions itself against the prerequisite sibling by saying 'Use after my_ladders', so an agent can distinguish it from plan_ladder/plan_limit_order without opening either schema.

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?

'Use after my_ladders' gives a clear sequencing cue, and each action value is described with its effect, so the agent knows which action to pick. However, it never names an alternative tool to route to (e.g., opening a ladder) nor states when-not to use it; the routing guidance is strong but not complete.

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