Skip to main content
Glama

Plan a new pool on LoomDesk's hook

plan_open_pool
Read-onlyIdempotent

Plans a new Uniswap v4 pool for a token on LoomDesk's open hook (LoomOpenHookV2), where nine tenths of the swap fee go to the liquidity and a tenth to the LoomDesk book, taken in the quote. Use when ladder_pools shows no pool of the token against the quote wanted, or none that pays liquidity; when a position is wanted in it right away, prefer plan_build, which opens the pool and builds in one transaction. Returns: transactions[] (to, data, value in wei, gas), check (simulated, ok, failedStep, reason, ethNeeded, ethHeld), sendWithin, ifItReverts, slippagePct, the pool's key and opening price, then (the key and price for plan_ladder with newPool). The pool opens at the price of the token's existing market and holds nothing until liquidity is added; one-off cost about a dollar. 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 pair already has a pool on the hook, the quote has no exit (under 2,000 USDG of liquidity on the chain), or the token has no market to price from.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesThe wallet that signs, sends, and pays the opening cost.
quoteYesWhat the token trades against: ETH, USDG, or a quote token's address (a tokenized stock, LOOM, any token with a real exit).
tokenYesThe token's address.
feePctYesThe pool's swap fee in percent: 0.1 (rungs from 0.01% wide), 0.5 (from 0.1%), or 1 to 5 (from 2%).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / feePct / description
      Previous value: -"the pool's swap fee in percent: 0.1 (rungs at least 0.01% wide), 0.5 (0.1%), or 1 to 5 (2%)"New value: +"The pool's swap fee in percent: 0.1 (rungs from 0.01% wide), 0.5 (from 0.1%), or 1 to 5 (from 2%)."
    • addedInput schema / properties / owner / description
      Added value: +"The wallet that signs, sends, and pays the opening cost."
    • changedInput schema / properties / quote / description
      Previous value: -"\"ETH\", \"USDG\", or the address of the quote token: a tokenized stock, LOOM, or any token with an exit"New value: +"What the token trades against: ETH, USDG, or a quote token's address (a tokenized stock, LOOM, any token with a real exit)."
    • addedInput schema / properties / token / description
      Added value: +"The token's address."
  2. Changed3 schema fields changed
    • changedInput schema / properties / feePct / description
      Previous value: -"the pool's swap fee in percent: 1, 2, 3, 4 or 5"New value: +"the pool's swap fee in percent: 0.1 (rungs at least 0.01% wide), 0.5 (0.1%), or 1 to 5 (2%)"
    • changedInput schema / properties / feePct / minimum
      Previous value: -1New value: +0.1
    • changedInput schema / properties / feePct / type
      Previous value: -"integer"New value: +"number"
  3. Changed1 schema field changed
    • changedInput schema / properties / feePct / maximum
      Previous value: -5New value: +10
  4. Changed6 schema fields changed
    • removedInput schema / properties / feePct / anyOf
      Removed value: -[
      -  {
      -    "const": 1,
      -    "type": "number"
      -  },
      -  {
      -    "const": 3,
      -    "type": "number"
      -  }
      -]
    • addedInput schema / properties / feePct / description
      Added value: +"the pool's swap fee in percent: 1, 2, 3, 4 or 5"
    • addedInput schema / properties / feePct / maximum
      Added value: +5
    • addedInput schema / properties / feePct / minimum
      Added value: +1
    • addedInput schema / properties / feePct / type
      Added value: +"integer"
    • changedInput schema / properties / quote / description
      Previous value: -"\"ETH\", \"USDG\", or the address of a token the hook allows as a quote (a tokenized stock, so that NVDA/SPY is a pool; any token when the owner has switched that on)"New value: +"\"ETH\", \"USDG\", or the address of the quote token: a tokenized stock, LOOM, or any token with an exit"
  5. Changed4 schema fields changed
    • addedInput schema / properties / quote / anyOf
      Added value: +[
      +  {
      +    "enum": [
      +      "ETH",
      +      "USDG"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "pattern": "^0x[0-9a-fA-F]{40}$",
      +    "type": "string"
      +  }
      +]
    • addedInput schema / properties / quote / description
      Added value: +"\"ETH\", \"USDG\", or the address of a token the hook allows as a quote (a tokenized stock, so that NVDA/SPY is a pool; any token when the owner has switched that on)"
    • removedInput schema / properties / quote / enum
      Removed value: -[
      -  "ETH",
      -  "USDG"
      -]
    • removedInput schema / properties / quote / type
      Removed value: -"string"
  6. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description goes well beyond them: the pool holds nothing until liquidity is added, opens at the existing market price, costs about a dollar, is priced from this block and simulated from the owner, consumes agent_quota units, must be sent within check.sendWithin, and should be re-planned rather than resent if it reverted.

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?

Dense but front-loaded, with clear Returns/Behavior/Errors segments. The long enumeration of return fields is justified by the absence of an output schema, though the prose is run-on in places and could be trimmed slightly.

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?

With no output schema, the description compensates fully by enumerating the return payload, explaining the follow-up (key and price for plan_ladder with newPool), stating quota cost, and listing the three refusal conditions. An agent has everything needed to call and interpret it.

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 baseline is 3, but the description adds real meaning: the fee is 'taken in the quote,' and the quote parameter must have a 'real exit' (refused under 2,000 USDG of on-chain liquidity), which is a constraint the schema does not state.

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+resource+target: plans a new Uniswap v4 pool for a token on LoomDesk's open hook (LoomOpenHookV2), and names the mechanism (fee split to liquidity vs. book). It is clearly separable from siblings plan_build and plan_ladder, which it references by name.

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?

Explicit selection rule: 'Use when ladder_pools shows no pool of the token against the quote wanted, or none that pays liquidity,' plus an exclusion routing to plan_build 'when a position is wanted in it right away.' It also enumerates refusal conditions, so the agent knows when this tool will not work.

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