Skip to main content
Glama

OursMeme Binance Agentic Wallet MCP

平仓

build_close_position
Read-only

生成市价平仓交易(兼容 USDC 本位与 Meme 币本位),默认全平;传 sizeUsd 可部分平仓(按比例取回保证金)。(自动附带可直接执行的 baw contract-call preview/execute 命令,且默认精确额度授权)

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>",
      "side": "<side>",
      "slippagePct": "<slippagePct>"
    },
    "name": "build_close_position"
  }
}

Input Schema

NameRequiredDescriptionDefault
sideYeslong 做多,short 做空
agentNoagent 专用通道:填 agent 自己的钱包地址后,交易由 agent 用自己的私钥直接签名发送,不用用户逐笔确认(用户需先用 build_agent_authorize 授权这个地址)。不填则由用户钱包签名
marketYes市场:短链接 slug、市场合约地址、代币地址、代币代号,或标的代号如 BTC / ETH / XAU(表示该标的的官方市场)
accountYes用户钱包地址(交易的签名人和收款人)
sizeUsdNo要平掉的仓位规模(美元名义);不填为全平
slippagePctYes滑点百分数,默认 0.3(即 0.3%)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Beyond the annotations, it discloses that the output includes directly executable baw contract-call preview/execute commands and that precise-amount allowance approval is attached by default — real behavioral context for a builder tool. readOnlyHint=true is defensible since this constructs a transaction rather than sending it, but the description never says the transaction is unsigned/unsent, leaving that boundary to inference.

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 the core action and scope, with the partial-close rule following immediately. The trailing parenthetical about preview/execute commands and allowance approval is slightly dense but earns its place as behavioral 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?

With no output schema, the description does explain what the caller gets back (preview/execute commands), and all six parameters are fully documented in the schema. It does not cover edge cases such as what happens when no position exists or when sizeUsd exceeds the position, which would matter for a close operation.

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 100%, so the baseline is 3. The description adds some meaning for sizeUsd by explaining that partial closes return margin proportionally (按比例取回保证金), but says nothing extra about side, market, account, agent, or slippage beyond what the schema already documents.

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+resource: 生成市价平仓交易, plus scope (USDC 本位与 Meme 币本位) and default behavior (默认全平). An agent can distinguish it from build_open_position by the 平仓 framing, though the description never names 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 Guidelines3/5

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

It tells the agent the default (full close) and the condition for partial close (pass sizeUsd), which covers the main in-tool choice. It gives no guidance on when to prefer this over alternatives such as build_set_tp_sl, build_cancel_orders, or opening an offsetting position, so the routing decision is left implicit.

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