Skip to main content
Glama
78degrees

QuantRisk-MCP-Server

optimize_portfolio

Determine optimal asset allocation through mean-variance optimization. Choose from max Sharpe, min variance, or target return objectives with optional weight and sector constraints.

Instructions

Find the optimal portfolio allocation using mean-variance optimization. Supports max Sharpe, min variance, and target return objectives. Paid tier only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tickersYesUniverse of tickers to optimize across. Must be 2-50 tickers. The optimizer will determine the best weights within this set.
objectiveNoOptimization objective. "max_sharpe" = maximize risk-adjusted return, "min_variance" = minimize portfolio volatility, "target_return" = hit a specific return with minimum risk. Default: "max_sharpe".max_sharpe
target_returnNoRequired when objective is "target_return". Annualized return as a decimal, e.g. 0.12 = 12% annual return target.
constraintsNoOptional weight constraints. See ConstraintsInput for details.
risk_free_rateNoAnnualized risk-free rate as a decimal, e.g. 0.05 = 5%. Used in Sharpe ratio calculation. Default: 0.05.
lookback_daysNoHistorical window for estimating return and covariance. 252 = 1 year, 756 = 3 years, 1260 = 5 years. Range: 252-1260. Default: 756.
Behavior2/5

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

No annotations are provided, so the description bears full responsibility. It only mentions the method and paid tier, but does not disclose side effects, data requirements (beyond tickers), error conditions, or any other behavioral traits. Given the tool's complexity, this is a significant gap.

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?

The description is concise and front-loaded, three short sentences that quickly convey the core purpose and key constraints. It could be slightly more structured, but it is efficient and avoids unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description lacks crucial information about what the tool returns (output schema is absent). For a complex optimization tool with 6 parameters and nested objects, this is a notable omission. The description should at least mention that it returns optimal weights and associated metrics.

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% with detailed parameter descriptions. The tool description adds no additional meaning beyond what the schema already provides, so a baseline score of 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?

The description clearly states the tool's action (find optimal portfolio allocation), method (mean-variance optimization), and supported objectives (max Sharpe, min variance, target return). It also distinguishes itself by mentioning 'Paid tier only', which differentiates it from potential free alternatives among siblings.

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 description provides clear context for when to use the tool, including the paid tier restriction and supported objectives. However, it does not explicitly compare with siblings like 'monte_carlo_simulation' or 'analyze_risk', leaving some ambiguity about when to prefer this tool over alternatives.

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/78degrees/mcp-server'

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