Skip to main content
Glama

Generate Strategy Code (no training)

generate_strategy

Generate Python strategy code (no training/deploy). Use when the user wants raw code.

Args:
  features: NL description of features (e.g. "RSI 14, Bollinger Bands").
  signals: NL description of signal logic (e.g. "Buy when RSI < 30").
  model: ML model name (default Random Forest).
  risk: NL risk rules (e.g. "0.5% stop loss").
  description: Optional one-line summary; treated as PRIMARY USER REQUEST.
  symbol: Currency pair the code should target. One of: EURUSD, USDJPY,
    GBPUSD, USDCHF, USDCAD, AUDUSD, NZDUSD. Default EURUSD.
  timeframe: Candle granularity. One of: 1min, 5min, 15min, 1h. Default 15min.
  claude_model: "sonnet" (default) or "haiku" (faster, higher daily cap).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
riskNo
modelNoRandom Forest
symbolNo
signalsNo
featuresNo
timeframeNo
descriptionNo
claude_modelNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

B3.2/5.0
Behavior2/5

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

Annotations indicate openWorldHint=true and readOnlyHint=false, suggesting side effects. The description does not explain that the tool uses an AI model (implied by claude_model) or that it may call external APIs. It also does not describe the return format or side effects, such as saving generated code. Given the annotations carry some burden, the description fails to add sufficient behavioral context.

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 description is front-loaded with the purpose, but the parameter list is lengthy and could be more structured (e.g., bullet points). Every sentence is informative, but the length is borderline excessive for a tool description.

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?

Given the complexity (8 params, 0 required, output schema exists), the description covers purpose and parameters reasonably. However, it lacks differentiation from sibling tools like get_strategy_code (retrieval) or one_shot (generation with backtest). No usage examples are provided, and the output format is left to the output schema. Completeness is adequate but not thorough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It provides detailed explanations for all 8 parameters, including defaults, enumerated values for symbol and timeframe, and guidance that 'description' is the primary request. This adds significant meaning beyond the bare schema, earning a 4.

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 clearly states 'Generate Python strategy code (no training/deploy)' and 'Use when the user wants raw code.' This conveys a specific verb (generate) and resource (strategy code), distinguishing it from siblings like get_strategy_code or one_shot. However, it does not explicitly contrast with all siblings, so a 4 is appropriate.

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 provides context ('Use when the user wants raw code') and notes that the 'description' parameter is treated as the primary user request. However, it does not mention when not to use this tool or suggest alternatives among siblings, leaving some ambiguity.

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.

TDQS

A3.9/5.0
Disambiguation4/5

Most tools have clearly distinct purposes, though browse_community, find_strategy, and one_shot (community_id) are related and could cause confusion if descriptions are not read carefully. Overall well-differentiated.

Naming Consistency4/5

Overwhelmingly follows a verb_noun pattern (browse_community, find_strategy, generate_strategy, get_deploy_result, etc.). A few exceptions like 'one_shot' and 'top_up' break the pattern but are still clear and memorable.

Tool Count4/5

13 tools cover the major functions of a trading strategy platform (discover, generate, deploy, monitor, account management). The count feels appropriate, though 'stream_test' is diagnotic and may not be needed in all contexts.

Completeness3/5

Covers core workflows well—browse, find, generate, deploy, and get results. However, lacks tools to update or stop a deployed model, and there's no way to edit an existing strategy, leaving some lifecycle gaps.

Resources