Skip to main content
Glama

optimize_portfolio

Optimize trading card portfolios with Markowitz mean-variance analysis and Merton jump-diffusion simulations for optimal allocation, sizing, and rebalancing based on budget and risk tolerance.

Instructions

Optimize a trading card portfolio using Markowitz mean-variance analysis with Merton jump-diffusion Monte Carlo simulations.

Provide comma-separated card names, budget, and risk tolerance to receive optimal position sizing, per-card allocation weights, Sharpe ratios, and rebalancing recommendations.

PAID: $0.50 USDC per call.

Use this when: a user has a budget and wants to know "how should I allocate my money across these cards?"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNo
cardsYes
budgetNo
risk_toleranceNomoderate

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.1/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It describes the analytical method, expected outputs (position sizing, allocation weights, Sharpe ratios, rebalancing recommendations), and implicitly indicates a read-only optimization action. Good transparency for a non-destructive tool.

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 overall, but includes a redundant 'PAID' line that is not necessary for tool selection. The core information (purpose, inputs, outputs) is presented in a straightforward manner.

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 tool's complexity, the description covers the main aspects: what it does, what inputs are needed, what outputs to expect, and when to use it. Missing details about the 'days' parameter and possible values for risk_tolerance are minor gaps.

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 75% (3 of 4 parameters mentioned). It clarifies that 'cards' is comma-separated, and explains the role of budget and risk_tolerance. However, 'days' is not mentioned at all, leaving its purpose ambiguous.

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 states a specific verb ('Optimize'), resource ('trading card portfolio'), and method ('Markowitz mean-variance analysis with Merton jump-diffusion Monte Carlo simulations'). It clearly distinguishes from sibling tools like market_snapshot or card_forecast.

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?

Provides an explicit when-to-use scenario ('a user has a budget and wants to know how should I allocate my money across these cards?'). Lacks an explicit when-not-to-use, but the use case is clear enough.

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