Skip to main content
Glama

基于已有代币创建市场

build_attach_market
Read-only

Create a perpetual market from an existing Meme token contract: token controllers get a shared-strategy submarket, while third parties get a fully isolated market with independent LP and mining pools.

Instructions

基于已存在的平台 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 的比例 %(50–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. First observedv1.0.0

TDQS

B3/5.0
Behavior1/5

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

Annotations declare readOnlyHint=true, yet the description states the tool '创建新的永续合约市场' with dedicated GM pools, LP/creator revenue splits, and optional mining pools — a clear state-mutating operation. Nothing in the description reconciles this (e.g., that it merely builds an unsigned transaction), so the two structured and unstructured signals directly conflict.

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 front-loaded sentence with the core action first, then the two branches enumerated after the colon. It is dense but every clause (isolation, independent pools, no linkage to original dividends/buyback) carries decision-relevant information; only the nested parenthetical makes it slightly hard to parse.

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, the description covers the structural outcome of each branch but omits permissions/ownership checks, cost or funding implications, and what the call actually returns (transaction payload vs executed market). The unresolved readOnlyHint conflict further undermines an agent's ability to predict the effect of calling it.

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 the schema already defines all 11 parameters including ranges for lpPct, refPct, fundingTier and miningDecayBps; baseline 3 applies. The description adds conceptual framing (isolated GM pool, LP/creator split, optional loss-mining pool) that contextualizes lpPct and the mining* family, but it never references maxLeverage, under, refPct or fundingTier.

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 ('基于已存在的平台 Meme 代币合约创建新的永续合约市场') and immediately splits the outcome into two clearly named branches (original token controller vs third-party). An agent can understand what is produced without opening the schema, though it never names build_launch_market as the contrasting sibling, so the launch-vs-attach distinction is left implicit.

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?

The two conditional branches (caller is the original token controller → shared-strategy sub-market; third-party → fully isolated market) implicitly tell an agent which situation it is in and what results. However, there is no explicit guidance on when to prefer this tool over the sibling build_launch_market, no prerequisites (e.g., the token must already exist on-platform), and no exclusions.

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