Skip to main content
Glama

取出 LP

build_withdraw_lp
Read-only

Builds an unsigned transaction to withdraw LP shares and redeem underlying assets (USDC or meme tokens); omit shares to withdraw all. Market creators must request a 7-day unlock before redemption.

Instructions

生成取出 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. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description adds material behavior beyond that: the redemption asset mapping per market type, the default-to-full-redemption rule, and the creator lock-up prerequisite with its 7-day unlock wait. It does not say what the generated transaction looks like (unsigned payload vs. hash) or what the caller must do with it next, which keeps it at a 4 rather than 5.

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 action and its asset-routing behavior are front-loaded in the first clause, with the default and lock-up conditions following as secondary detail. Each sentence carries distinct information; only the `shares` default slightly duplicates the schema.

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 three-parameter transaction-building tool with no output schema, the description covers the key things an agent needs to invoke it correctly: asset routing, default share behavior, and the creator lock-up prerequisite. The remaining gap is the return value — an agent cannot tell from the description whether it receives an unsigned transaction to sign or an executed result.

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 would be 3, but the description adds meaning beyond the schema: it explains that the market type determines which asset is redeemed back, which is a semantic consequence of the `market` parameter that the schema does not state. The `shares` default-to-all behavior is repeated from the schema rather than extended.

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?

The description opens with a precise verb+resource: generating a transaction that withdraws LP shares and redeems them into underlying assets. It further disambiguates the result by market type (USDC-quoted markets return USDC, token-quoted markets return the corresponding Meme token), so an agent can distinguish it from build_deposit_lp without inspecting schemas.

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 real usage conditions: omitting `shares` redeems everything, ordinary LPs have no lock-up and can redeem immediately, while market creators (dev) must first request an unlock and wait 7 full days before calling this tool. What it lacks is any explicit alternative tool to use when those prerequisites are not met, so it falls 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.