Skip to main content
Glama
sablier-ai

Sablier MCP Server

Official
by sablier-ai

optimize_portfolio

Read-only

Optimize portfolio weights using factor exposures from simulation batches. Select objectives like max Sharpe, min variance, or risk parity to achieve your investment goals.

Instructions

Find optimal portfolio weights using per-asset factor exposures from compute_betas or analyze_quantitative. Requires simulation_batch_id (from their output). Objectives: 'max_sharpe' (maximize risk-adjusted return), 'min_variance' (minimize portfolio volatility), 'max_return' (maximize expected return for given risk). Advanced objectives (pass the string directly): 'analytical_risk_parity' (equalize risk contributions), 'mean_cvar' (minimize CVaR, requires simulation_ids not beta_simulation_ids), 'expected_utility' (maximize CRRA utility), 'risk_parity' (CVaR-based equal risk), 'exposure_target' (match target factor exposures — set target_exposures on the API). Default: 'max_sharpe'. Long-only constraint applied by default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
objectiveNoOptimization objective: 'max_sharpe' (default), 'min_variance', 'max_return', 'analytical_risk_parity' (equal risk contributions), 'expected_utility' (CRRA), 'risk_parity' (CVaR-based), 'mean_cvar' (minimize CVaR)max_sharpe
portfolio_idYesThe portfolio UUID
simulation_batch_idYesFrom compute_betas or analyze_quantitative

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true. The description adds valuable behavioral context: the default objective (max_sharpe), the long-only constraint, and the special requirement that mean_cvar uses simulation_ids instead of beta_simulation_ids. This goes beyond the annotations without contradicting them.

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 dense but well-structured: main purpose, prerequisite, objective list, advanced options, default, and constraint. Every sentence provides actionable information without fluff, and it's front-loaded with the core purpose.

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

Completeness5/5

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

For a tool with multiple objectives and a prerequisite, the description covers essential usage: source of simulation_batch_id, objective meanings, special cases, default, and constraint. Since an output schema exists, return values need not be explained. The description is sufficiently complete for correct invocation.

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?

The schema already documents all three parameters (100% coverage), but the description significantly enriches the 'objective' parameter by explaining each option, including advanced objectives and their unique parameter needs (e.g., mean_cvar requires simulation_ids). It also hints at target_exposures for exposure_target, adding practical value beyond the 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 clearly states the tool's purpose with a specific verb and resource: "Find optimal portfolio weights using per-asset factor exposures from compute_betas or analyze_quantitative." It distinguishes itself from siblings by focusing on optimization objectives and prerequisites, 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?

The description provides explicit usage context by requiring simulation_batch_id from compute_betas or analyze_quantitative, and enumerates objectives with their specific purposes. It doesn't explicitly name alternative tools for when not to use, but the prerequisite and objective details give clear guidance.

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/sablier-ai/sablier-mcp'

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