Skip to main content
Glama

How to write a strategy

get_strategy_spec_rules
Read-only

REQUIRED reading before calling run_backtest or check_strategy for the first time. Returns the full strategy format: the JSON schema, every supported indicator with the range it can occupy, the condition operators, and worked examples.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds substantive context beyond that: it is a static reference payload whose contents (indicator ranges, operators, examples) are enumerated, which tells the agent this is documentation retrieval rather than data lookup. It does not explicitly say the content is static/cacheable, which keeps it short of 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, both front-loaded: the first states the prerequisite and when it applies, the second enumerates the payload. No filler or restatement of the title.

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

Completeness5/5

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

No output schema exists, so the description carries the return-value burden and does so by enumerating the four content categories. For a zero-parameter reference tool, an agent has everything it needs to decide when and why to call it.

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?

The tool takes zero parameters, so per the rubric the baseline is 4. The description correctly does not waste space describing nonexistent inputs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb and resource: it 'returns the full strategy format' and enumerates exactly what that contains (JSON schema, supported indicators with ranges, condition operators, worked examples). This clearly separates it from siblings like get_strategy or check_strategy, which operate on concrete strategies rather than the format spec.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use: 'REQUIRED reading before calling run_backtest or check_strategy for the first time.' It names the two sibling tools that depend on this knowledge and the trigger condition ('for the first time'), leaving nothing to inference.

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