Skip to main content
Glama

平仓

platform_close_position
Destructive

【持仓与执行】平仓(写操作,需确认):按 credentialId + symbol 平掉持仓;closeScope=full 全平,传 size 时部分平。(cost: free)(写操作,外部调用将以 apikey 身份直接执行)

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": {
      "credentialId": "<credentialId>",
      "symbol": "<symbol>"
    },
    "name": "platform_close_position"
  }
}

Input Schema

NameRequiredDescriptionDefault
sizeNo平仓数量(可选,缺省全平)
symbolYes交易对(必填)
closeScopeNofull=全平(可选,默认 full)
marketTypeNo市场类型 swap/spot(可选)
credentialIdYes交易所凭证 ID(必填)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is covered. The description adds genuinely new behavioral facts beyond that: explicit confirmation is required, execution happens directly as the apikey identity, and the call is free. It stops short of saying what happens on a partial close exceeding position size or what the response contains.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The scoping and mode information is front-loaded and readable, but the '写操作' marker is duplicated in two separate parentheticals, wasting space. The stacked bracket tags make it feel like concatenated metadata rather than prose.

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 five-parameter mutation tool with no output schema, the definition covers the essentials: required keys, the full/partial switch, cost, and identity under which execution occurs. What is missing is failure behavior (no position, insufficient size) and how marketType affects the close.

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 does add a small amount of precedence meaning by pairing closeScope=full with size-triggered partial closing, but it says nothing about marketType (swap/spot) and gives no unit or rounding guidance for size.

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 and resource (平仓/close position) plus the keying strategy (credentialId + symbol) and the two modes (full vs partial). It does not distinguish itself from close relatives in the sibling list such as platform_close_preview or platform_flat_all, leaving the agent to infer the difference.

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?

Signals that this is a confirmation-requiring write operation, that it executes under the API key identity, and that it costs nothing, which is real usage context. It never says when NOT to use it or points to platform_close_preview for a dry run or platform_flat_all for closing everything at once.

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.