Skip to main content
Glama

nestegg-calculators

Sharpe Ratio

sharpe-ratio
Read-onlyIdempotent

Sharpe ratio: excess mean return per unit of volatility, (mean - riskFree) / stdev. Null when volatility is undefined or zero.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
returnsYesThe return series (percents).
riskFreePctNoRisk-free rate in the same unit (default 0).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sharpeNoSharpe ratio (null if no volatility).
meanPctNoMean return.
stdevPctNoVolatility.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.5/5.0
Behavior3/5

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

The annotations already establish the operation as read-only and idempotent. The description adds a key edge-case behavior—returning null when volatility is undefined or zero—which is useful context beyond the annotations, though it does not elaborate on other potential inputs like empty arrays.

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?

One compact sentence packs the definition, formula, and null-case behavior without excess. The key information is front-loaded.

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?

For a simple financial calculator, the description covers the core computation and edge-case null behavior. It relies on the output schema for return details and doesn't specify minimum data length, but this is minor given the low complexity and strong annotations.

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 descriptions cover both parameters fully (100%). The description's formula clarifies the role of riskFreePct as a subtraction from the mean and stdev as the denominator, adding relational meaning beyond the schema's simple definitions.

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 precisely defines the Sharpe ratio with its formula and identifies the resource (a return series). It distinguishes the tool from siblings like return-stats or real-return by naming the specific metric, though it lacks an explicit action verb like 'calculate'.

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 guidance on when to use this tool versus alternatives. It does not mention exclusions or conditions under which a different metric would be more appropriate, so the agent must infer usage context from the formula alone.

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.