Skip to main content
Glama

基于已有代币创建市场

build_attach_market
Read-only

基于已存在的平台 Meme 代币合约创建新的永续合约市场:若调用者为原代币控制者则作为项目子市场共享原策略,若为第三方用户则自动创建完全隔离的独立永续市场(独立 GM 池、独立 LP/创建者分成与可选独立亏损挖矿池,不关联原项目分红/回购)。

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>",
      "token": "<token>",
      "under": "<under>",
      "maxLeverage": "<maxLeverage>",
      "lpUsdc": "<lpUsdc>",
      "fundingTier": "<fundingTier>",
      "lpPct": "<lpPct>",
      "refPct": "<refPct>",
      "miningTokens": "<miningTokens>",
      "miningDays": "<miningDays>",
      "miningDecayBps": "<miningDecayBps>"
    },
    "name": "build_attach_market"
  }
}

Input Schema

NameRequiredDescriptionDefault
lpPctYes第三方独立市场:平台扣 20% 后分配给本池 LP 的比例 %(20–100,其余归本市场创建者)
tokenYes已存在的 Meme 代币合约地址
underYes标的代号,如 BTC / ETH / XAU;平台可以添加新标的
lpUsdcYes首笔 LP 存入 USDC
refPctYes永续邀请返佣比例 %(0–40)
accountYes市场创建者钱包
miningDaysYes挖矿释放总天数(miningTokens > 0 时生效)
fundingTierYes资金费档位:0 保守 / 1 标准 / 2 激进
maxLeverageYes最大杠杆(10–50)
miningTokensYes注入亏损挖矿池的代币数量(0 表示不开矿池或沿用原项目共享矿池)
miningDecayBpsYes每月递减万分比(0 为匀速释放)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / lpPct / description
      Previous value: -"第三方独立市场:平台扣 20% 后分配给本池 LP 的比例 %(50–100,其余归本市场创建者)"New value: +"第三方独立市场:平台扣 20% 后分配给本池 LP 的比例 %(20–100,其余归本市场创建者)"
    • changedInput schema / properties / lpPct / minimum
      Previous value: -50New value: +20
    • addedInput schema / properties / lpUsdc / maximum
      Added value: +100000000
    • addedInput schema / properties / miningTokens / maximum
      Added value: +1000000000000000
  2. First observed

TDQS

B3.4/5.0
Behavior3/5

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

The description adds real behavioral context that annotations do not cover: third-party markets are fully isolated, with their own GM pool, their own LP/creator split, and no link to the original project's dividends or buybacks. However, it does not resolve the execution model. Despite saying it 'creates' a market, the annotations declare readOnlyHint=true, which in this build_* family presumably means it returns a transaction to be signed; the description never says this, and it says nothing about costs, permissions, or idempotency.

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 description is a single dense sentence whose core behavior comes first, followed by the two conditional branches. The nesting is heavy, with a long parenthetical enumerating the isolated components, but every clause adds information and none is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-required-parameter market-creation tool with no output schema and no annotations for destructive or write semantics, the description covers the business semantics well but leaves out the operational picture: it does not say what is returned, whether approval steps (such as build_site_setup or LP deposit) are needed first, or what happens when the token is already attached.

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%, and all 11 parameters, including bounds such as lpPct 20–100 and fundingTier 0/1/2, are documented inline. The description adds conceptual mapping by mentioning the independent LP/creator split and the optional independent loss-mining pool, which correspond to lpPct and miningTokens, but it adds no syntax or constraint detail beyond the schema. Baseline 3.

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 states a specific action and resource: it creates a new perpetual market from an existing Meme token contract. It also defines two clearly different behaviors: it creates a project sub-market that shares the original strategy, or it creates a fully isolated independent market. It does not explicitly name build_launch_market as what to use for new tokens, so an agent must infer that boundary instead of being told it.

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?

Usage is implied only through conditions: if the caller is the original token controller, or if the caller is a third-party user. That tells the agent which mode applies, but not when to choose this tool instead of build_launch_market, what prerequisites exist (such as token ownership verification or LP funding), or what happens on failure.

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