Skip to main content
Glama
Biahellens

mcp-financial-data-server

by Biahellens

get_portfolio_metrics

Compute risk/return metrics for a weighted stock portfolio, including cumulative and annualized return, volatility, Sharpe ratio, and max drawdown.

Instructions

Compute risk/return metrics for a weighted portfolio of stocks.

Args: tickers: Ticker symbols in the portfolio, e.g. ['AAPL', 'MSFT']. weights: Portfolio weight per ticker, same order, must sum to 1.0. period: Lookback window: one of '1mo','3mo','6mo','1y','2y','5y','10y','ytd','max'. risk_free_rate: Annualized risk-free rate for the Sharpe ratio (e.g. 0.1075 for 10.75%).

Returns cumulative return, annualized return, annualized volatility, Sharpe ratio, and max drawdown for the combined portfolio.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
periodNo1y
tickersYes
weightsYes
risk_free_rateNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It is transparent about what the tool computes and returns, listing cumulative return, annualized return, annualized volatility, Sharpe ratio, and max drawdown. It does not discuss edge cases, data sources, or validation behavior, but the compute-and-return nature is well conveyed.

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?

The description is compact, structured into Args and Returns sections, and every sentence carries necessary information. There is no filler or repetition of the input schema, and the purpose statement 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?

Given the absence of an output schema and annotations, the description covers the key inputs and outputs well. It could be more complete by specifying the exact return format/keys or whether outputs are decimal or percentage, but it provides enough detail for an agent to understand the tool's scope and behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must fully compensate. It does: tickers are given with an example, weights are explained with the 'same order' and 'must sum to 1.0' constraint, period is enumerated with all valid values, and risk_free_rate is explained with an annualized example. This is significantly more useful than the bare schema.

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 opens with a specific verb and resource: 'Compute risk/return metrics for a weighted portfolio of stocks.' This clearly distinguishes the tool from siblings like get_quote, compare_assets, and get_historical_summary by focusing on portfolio-level aggregated metrics rather than single quotes, comparisons, or historical summaries.

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?

The first sentence gives clear context: this is for computing portfolio risk/return metrics from tickers and weights. It does not explicitly name alternative tools or state when not to use it, but the portfolio-focused wording provides enough context for an agent to select it appropriately against the listed siblings.

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

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/Biahellens/mcp-financial-data-server'

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