Skip to main content
Glama

追加保证金

build_add_margin
Read-only

Add collateral to an existing perpetual position without increasing notional size, lowering effective leverage and moving the liquidation price farther away for USDC- or meme-margined markets.

Instructions

在不扩大持仓名义规模(sizeDeltaUsd = 0)的前提下,向已有仓位追加保证金以降低实际杠杆、拉远强平价(兼容 USDC 本位与 Meme 币本位,且不影响亏损挖矿加权持仓时间)。

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>"
    },
    "name": "build_add_margin"
  }
}

Input Schema

NameRequiredDescriptionDefault
sideYeslong 做多,short 做空
agentNoagent 专用通道:填 agent 自己的钱包地址后,交易由 agent 用自己的私钥直接签名发送,不用用户逐笔确认(用户需先用 build_agent_authorize 授权这个地址)。不填则由用户钱包签名
marketYes市场:短链接 slug、市场合约地址、代币地址、代币代号,或标的代号如 BTC / ETH / XAU(表示该标的的官方市场)
accountYes用户钱包地址(交易的签名人和收款人)
collateralUsdcNo追加的保证金金额(USDC 本位填 USDC 数量;Meme 币本位可按美元估算自动换算代币数,或直接传 collateralTokens)
collateralTokensNo仅 Meme 币本位永续市场使用:直接指定追加的 Meme 代币数量

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, destructiveHint=false, idempotentHint=false), and the description adds genuinely non-obvious behavior: the notional size is untouched, both USDC-margined and Meme-token-margined perpetuals are supported, and loss-mining weighted holding time is not affected. It does not explain that repeated invocation yields a fresh unsigned transaction (consistent with idempotentHint=false) or what signing prerequisites apply, which the schema's agent parameter carries instead.

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?

A single sentence that front-loads the defining constraint before the effects and compatibility notes — good ordering with no filler. The nested parentheticals make it dense on first read, but every clause carries 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?

For a six-parameter transaction-building tool with full schema coverage and annotations that already declare safety, the description supplies the key behavioral facts an agent needs: no notional change, both collateral modes, and no impact on weighted holding time. It omits edge-case behavior (e.g. a non-existent or already-liquidated position) but nothing essential to selecting or invoking the tool correctly is missing.

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 enum, account, market, and both collateral fields are already well documented in structured data. The description's collateral-mode clause (兼容 USDC 本位与 Meme 币本位) restates rather than extends what collateralUsdc/collateralTokens already say, and it adds no new constraint on the required account/market/side triple. Baseline 3 is appropriate where the schema does the heavy lifting.

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?

Names a specific verb and resource (向已有仓位追加保证金) and pins the defining constraint sizeDeltaUsd = 0, which cleanly separates it from opening or resizing a position. It also states the two economic effects (降低实际杠杆、拉远强平价), so an agent knows exactly what outcome this call produces.

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?

The description gives clear usage context: reach for this when the goal is to cut effective leverage or move the liquidation price further away without growing notional exposure. It does not explicitly name build_remove_margin as the inverse operation or state when-not to use it, so the alternative-routing is left implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.