Skip to main content
Glama

取出 LP

build_withdraw_lp
Read-only

生成取出 LP 份额换回底层资产(USDC 本位市场退回 USDC,币本位市场退回对应 Meme 代币)的交易;不填 shares 为全部取出。普通 LP 无锁仓限制即时赎回;市场创建者(dev)固定需先申请解锁满 7 天后再调用本工具领取赎回。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "account": "<account>",
      "market": "<market>"
    },
    "name": "build_withdraw_lp"
  }
}

Input Schema

NameRequiredDescriptionDefault
marketYes市场:短链接 slug、市场合约地址、代币地址、代币代号,或标的代号如 BTC / ETH / XAU(表示该标的的官方市场)
sharesNo取出多少份额;不填为全部
accountYes用户钱包地址(交易的签名人和收款人)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / shares / maximum
      Added value: +1000000000000000
  2. Changed3 schema fields changed
    • removedInput schema / properties / market / maxLength
      Removed value: -80
    • removedInput schema / properties / market / minLength
      Removed value: -1
    • removedInput schema / properties / market / type
      Removed value: -"string"
  3. First observed

TDQS

A3.9/5.0
Behavior4/5

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

The annotations (readOnlyHint=true, destructiveHint=false, idempotentHint=false) already establish the safety profile, and the description is consistent with them: it says it generates a transaction rather than executing a state change. Beyond the annotations, it discloses the lock-up/unlock preconditions for dev-created markets and the payout asset per market type, which is real behavioral context. It does not mention approval/allowance requirements or that the result is an unsigned transaction for the caller to sign.

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 description is a compact two-sentence block with the core action stated first, followed by the `shares` omission rule and then the lock-up exceptions. No sentence is wasted, although the dev-unlock clause is dense enough that a reader must parse it carefully.

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 3-parameter transaction-builder with full schema coverage and no output schema, the definition covers the action, the payout asset, the default for `shares`, and the creator lock-up prerequisite. The remaining gaps (unsigned-transaction return, allowance handling) are minor given the annotations and schema.

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 description coverage is 100%, so the schema already documents all three parameters, including the rule that omitting `shares` means withdrawing everything. The description only restates that omission rule and adds indirect meaning to `market` through the payout-asset explanation; the parameter baseline of 3 applies.

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 description gives a specific verb and resource: it generates a transaction that withdraws LP shares and redeems them for the underlying asset, and it names which asset is returned for each market type (USDC for a USDC-denominated market, the meme token for a coin-denominated market). This clearly distinguishes it from the deposit counterpart build_deposit_lp, though it does not name that sibling explicitly.

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?

It gives concrete usage conditions: omit `shares` to withdraw everything, ordinary LPs have no lock-up and can redeem immediately, while a market creator (dev) must first apply for an unlock and wait a full 7 days before calling this tool. It does not name an alternative tool or say when not to use it, which keeps it short of a 5.

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