Skip to main content
Glama

Ellimist

Portfolio optimization (QAOA + classical)

quantum_portfolio_optimize
Read-only

Use this to compute mean-variance portfolio weights from your own returns or covariance, optionally limited to a maximum number of assets; QAOA asset selection next to an exact classical baseline. Price: $0.05 USDC per call via x402 (no account). Not charged if it fails.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "quantum_portfolio_optimize"
  }
}

Input Schema

NameRequiredDescriptionDefault
assetsNo
backendNoaer
returnsNoT x N periodic returns
covarianceNo
max_assetsNo
max_weightNo
backend_noteNoset by Ellimist; leave empty
risk_aversionNo
current_weightsNoYour current holdings (weights by asset). Given, the result trades off turnover cost.
expected_returnsNo
periods_per_yearNo
turnover_penaltyNocost per unit of turnover (e.g. fees + slippage)
requested_backendNoset by Ellimist; leave empty

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered; the description goes beyond them with genuinely non-obvious operational facts: $0.05 USDC per call via x402 with no account, and no charge on failure. It is consistent with readOnlyHint since the tool only computes. What it omits is runtime/latency character, particularly how the aer and ibm backends differ in cost or reliability.

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?

Three short sentences, front-loaded with the action and input requirement, then the backend distinction, then pricing. No filler. The middle clause about QAOA versus classical baseline is slightly jargon-dense but carries real information.

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

Completeness3/5

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

With 13 parameters, no output schema, and low schema description coverage, the description should say what comes back — full weight vector versus selected subset, and how the classical baseline is reported alongside. It implies weights but never states the return shape, so an agent must call blind on the result format.

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 coverage is only 38% across 13 parameters, so the description must compensate and it only partly does: it explains returns-vs-covariance input, the max_assets cap, and the backend/QAOA-vs-classical choice. It adds no meaning for risk_aversion, max_weight, periods_per_year, expected_returns, or the turnover/current_weights interaction, all of which are undocumented or thinly documented in the schema as well.

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?

States a specific verb and resource: compute mean-variance portfolio weights from the caller's returns or covariance, with optional asset-count cap and a QAOA-selection versus classical-baseline comparison. An agent can tell what it produces. The one gap is that it never names or contrasts a sibling (e.g. quantum_portfolio_index_tracking), so the 'is this the right optimization flavor' question is left to inference.

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 opening 'Use this to compute... from your own returns or covariance' gives both the trigger and the input precondition, and 'optionally limited to a maximum number of assets' frames the main variant. There is no explicit when-not-to-use or named alternative, which keeps it below a 5.

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.

Resources