Skip to main content
Glama

Validate a strategy spec

validate_strategy
Read-onlyIdempotent

Parse and fingerprint one strategy spec without running a market, returning the offending field on grammar errors or a normalised spec. Iterate on specs cheaply before evaluating or ranking.

Instructions

Parse and fingerprint one strategy spec WITHOUT running it. Use it to iterate on a spec cheaply before evaluate_strategies or rank_strategies: a grammar error comes back naming the field that was wrong, and a valid spec comes back normalised with its fingerprint. A spec looks like {"signal": {"kind": "momentum", "lookback_days": 1.0}, "portfolio": {"top_k": 5, "gross": 1.0}}. Runs no market.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specYesOne strategy spec, for example {"signal": {"kind": "momentum", "lookback_days": 1.0}, "portfolio": {"top_k": 5, "gross": 1.0}}. `spec_version` may be left out and is then set to the current version.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description goes further by disclosing failure behavior (grammar errors name the offending field) and success behavior (normalised spec plus fingerprint), and it asserts no market is run. Return format is partly carried by the output schema, so 4 rather than 5.

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?

Front-loads the core action and the 'without running it' constraint in the first clause, then handles alternatives and behavior in two efficient sentences. The inline example is duplicated from the schema, a minor redundancy, but each sentence otherwise earns its place.

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?

For a single-parameter validation tool with an output schema and rich annotations, the description covers purpose, alternatives, failure and success behavior, and the no-side-effect guarantee. Nothing an agent needs in order to call it correctly is missing.

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 the single parameter is fully documented, including the optional spec_version default. The description repeats the example spec that the schema already supplies, adding no format or syntax meaning beyond it, so the baseline 3 applies.

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?

States a specific verb pair (parse and fingerprint) and resource (one strategy spec), plus the crucial scope qualifier 'WITHOUT running it.' It explicitly differentiates from the sibling tools evaluate_strategies and rank_strategies, so an agent can select it without opening any schema.

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?

Gives an explicit when-to-use: 'iterate on a spec cheaply before evaluate_strategies or rank_strategies.' It names the alternative tools and the condition (cheap iteration) that selects this one, leaving little to inference.

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