Skip to main content
Glama
AlgoChains

AlgoChains MCP Server

Official
by AlgoChains

detect_regime_hmm

Read-onlyIdempotent

Identify bull, bear, choppy, or crisis market regimes using Hidden Markov Model analysis of real daily returns. Outputs regime probability, duration, and transition metrics.

Instructions

Detect market regime using Hidden Markov Model on real daily returns: bull_trending, bear_trending, choppy, or crisis. Returns regime probability, days in current regime, transition probabilities, vol regime, and Sharpe. Uses hmmlearn if available, statistical fallback otherwise. Real Polygon data only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolNoSymbol to analyze (use SPY for broad market regime)SPY
lookback_daysNo
Behavior4/5

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

Description adds useful behavior beyond annotations: uses hmmlearn with fallback, returns multiple metrics (probabilities, days, transitions, vol regime, Sharpe). Annotations already indicate read-only, idempotent, non-destructive; description confirms and expands.

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: first sentence states purpose and outputs, second provides implementation detail and data source. Each sentence adds value; no redundancy.

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?

Description covers purpose, method, data source, and output types. No output schema exists, but description partially compensates by listing return metrics. Could mention output format or structure for completeness.

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 descriptions cover both parameters (symbol, lookback_days) adequately. Description does not add new parameter-specific details beyond schema, but schema coverage is reported as 50% likely due to metric calculation; baseline 3 is appropriate.

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?

Description clearly states action ('detect'), resource ('market regime'), method ('HMM on real daily returns'), and lists possible regime outcomes (bull_trending, bear_trending, etc.). Distinguishes from sibling tools like 'detect_market_regime' by specifying HMM and fallback.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool vs alternatives. Mentions 'Real Polygon data only' but does not elaborate on prerequisites or compare to sibling regime detectors.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AlgoChains/algochains-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server