Skip to main content
Glama

链上兑换

platform_dex_swap
Destructive

【持仓与执行】链上 DEX 兑换(写操作,需确认,动用真实资金):钱包地址自动取本人智能账户,不接受任意地址;大额授权需 approvalToken(由平台签发)。(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": {
      "chain": "<chain>",
      "toToken": "<toToken>",
      "amount": "<amount>"
    },
    "name": "platform_dex_swap"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYes链短名,如 ETH / BSC / BASE / SOL(必填)
amountYes卖出数量(最小单位字符串,必填)
toTokenYes买入代币(地址或符号,必填)
slippageNo滑点百分比(可选,默认 1)
amountUsdNo本次金额 USD 估值(可选,用于大额授权校验)
fromTokenNo卖出代币(地址或符号;原生币可留空)
referenceNo幂等参考号(可选)
approvalTokenNo大额授权确认 token(可选,平台签发)

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?

The annotations already declare readOnlyHint=false and destructiveHint=true, so the description goes beyond them by disclosing the requirements that matter: real funds are at risk, confirmation is needed, the wallet address is automatically taken from the user's own smart account and arbitrary addresses are rejected, and the call executes under the apikey identity. It never states what a successful call returns (for example, a tx hash), which is the main remaining gap.

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 critical facts (write operation, real funds, confirmation, approvalToken) are front-loaded, but the '写操作' disclaimer appears twice, and the bracketed tags (cost: free, apikey execution) are fragmented and partly redundant with the annotations.

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 an 8-parameter destructive mutation with no output schema, the description covers the safety and authorization story well, which is the highest-risk unknown. What it omits is the success response or any mention of the resulting transaction, which matters because no output schema exists to fill that in.

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 all 8 parameters are already documented, which sets the baseline at 3. The description adds context about approvalToken (it is issued by the platform and is needed only for large approvals) and about the implicit wallet address that is not a parameter, but it adds nothing about amount units, slippage defaults, or the reference idempotency key.

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 names a specific verb and resource: an on-chain DEX swap (链上 DEX 兑换) that is executed on-chain. An agent can tell it is a trade-execution tool, but the description never distinguishes it from its sibling platform_dex_quote, which is the natural alternative for pricing a swap before execution.

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 gives useful preconditions: it is a write operation requiring confirmation, it moves real funds, and large approvals require a platform-issued approvalToken. However, it never states when to prefer this tool over platform_dex_quote or platform_place_order, so the agent must infer the routing for itself.

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.