Skip to main content
Glama

compute_stats

Compute quantitative statistics (volatility, sharpe, max_drawdown, returns, beta, correlation) over a ticker's daily price history. Omit metrics to default to volatility/sharpe/max_drawdown/returns. beta and correlation require a benchmark ticker; risk_free_rate is used only by the Sharpe ratio. (paid: $0.0050/call)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rangeNo1y
tickerYes
metricsNo
benchmarkNo
risk_free_rateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description discloses the paid cost ($0.0050/call), default metric behavior, and dependency between metrics and benchmark/risk_free_rate. It does not mention error behavior or output format but covers the key behavioral caveats.

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 pack all essential information without fluff, front-loading the core purpose. The parenthetical details are efficiently structured.

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?

The description covers the necessary usage nuances for a 5-param tool with no output schema, leaving obvious parts (range, output shape) implicit. It's sufficient for an agent to invoke correctly for most cases.

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 schema has no descriptions, so the description adds crucial semantics: default metrics, benchmark requirement for beta/correlation, and the role of risk_free_rate. It doesn't explain range, but the enum values are self-explanatory.

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?

The description clearly states it computes quantitative statistics (volatility, sharpe, max_drawdown, returns, beta, correlation) over a ticker's daily price history, distinguishing it from portfolio-level or indicator tools. It lists the specific metrics available, making it unambiguous.

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

Usage Guidelines4/5

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

It explains when to omit metrics for defaults, that beta and correlation require a benchmark, and that risk_free_rate only affects Sharpe. This gives clear parameter-level guidance, though it doesn't name alternative tools explicitly. The pricing note also helps with cost-aware decisions.

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