Skip to main content
Glama

AI 生成策略

platform_ai_generate
Destructive

【策略】AI 生成策略代码(写操作,需用户确认):输入自然语言 prompt(可选 context 传入研究流水线结构化学徒上下文),返回策略代码与解释。(cost: ≈ 36–48 credits/次(按实际 tokens 结算))(写操作,外部调用将以 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": {
      "prompt": "<prompt>"
    },
    "name": "platform_ai_generate"
  }
}

Input Schema

NameRequiredDescriptionDefault
promptYes策略描述提示词,如「BTC 均线金叉策略」(必填)
contextNo可选结构化学徒上下文(B2-a):failedReasons/retiredFactors/reviewNotes/targetMetrics,独立注入 LLM,不进 prompt 文本

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 readOnlyHint=false and destructiveHint=true, so safety is covered; the description adds real value on top with a token-based cost estimate of roughly 36-48 credits per call, the requirement for user confirmation, and the fact that external calls execute directly under the apikey's identity. It does not explain why the tool is destructive or what existing strategy state might be replaced, 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 core purpose is front-loaded, but the parenthetical stack is repetitive and hard to parse: the write-operation warning appears twice, once as '写操作,需用户确认' and again as '写操作,外部调用将以 apikey 身份直接执行', and cost information is buried in nested parentheses. Merging those clauses would make it both shorter and clearer.

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?

With no output schema, the description correctly states that the return is strategy code plus an explanation. Combined with the cost estimate, confirmation requirement, and apikey execution context, an agent has enough to invoke this tool, although the consequence of the destructiveHint flag remains unexplained.

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 both the prompt and the nested context object are already fully documented in the schema, including the failedReasons/retiredFactors/reviewNotes/targetMetrics fields. The description only restates that prompt is natural language and context is optional structured apprentice context, adding no syntax, format, or injection semantics beyond the schema.

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: AI-generates strategy code from a natural-language prompt, and returns code plus explanation. That is clearly distinct from platform_run_backtest or platform_manage_strategy, though it never names the nearest sibling platform_ai_optimize, so the boundary between 'generate' and 'optimize' is left for the agent to infer.

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 description implies usage context by insisting on user confirmation and quoting cost, which signals this is a deliberate, user-approved action rather than a casual call. However, it gives no explicit when-to-use versus platform_ai_optimize or platform_quick_analysis, and no preconditions beyond the optional context object.

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.