portfolio-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@portfolio-mcpOptimize my tech_stocks portfolio for the maximum Sharpe ratio"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
portfolio-mcp
A portfolio analysis MCP server powered by mcp-refcache for building AI agent tools that handle financial data efficiently.
Features
Portfolio Management: Create, read, update, delete portfolios with persistent storage
Data Sources: Yahoo Finance (stocks/ETFs), CoinGecko (crypto), Synthetic (GBM simulation)
Analysis Tools: Returns, volatility, Sharpe ratio, Sortino ratio, VaR, drawdowns, correlations
Optimization: Efficient Frontier, Monte Carlo simulation, weight optimization
Reference-Based Caching: Large datasets cached via mcp-refcache to avoid context bloat
Related MCP server: FinMCP
Installation
Using uv (recommended)
# Clone the repository
git clone https://github.com/l4b4r4b4b4/portfolio-mcp
cd portfolio-mcp
# Install dependencies
uv sync
# Run the server
uv run portfolio-mcp stdioUsing pip
pip install portfolio-mcp
portfolio-mcp stdioQuick Start
Connect to Claude Desktop
Add to your Claude Desktop configuration (~/.config/claude/claude_desktop_config.json):
{
"mcpServers": {
"portfolio-mcp": {
"command": "uv",
"args": ["run", "--directory", "/path/to/portfolio-mcp", "portfolio-mcp", "stdio"]
}
}
}Basic Usage
Once connected, you can use natural language to:
"Create a portfolio called 'tech_stocks' with AAPL, GOOG, and MSFT"
"Analyze the returns and volatility of my tech_stocks portfolio"
"Optimize my portfolio for maximum Sharpe ratio"
"Show me the efficient frontier with 20 points"
"Compare my portfolios by Sharpe ratio"Available Tools
Portfolio Management (6 tools)
create_portfolio- Create a new portfolio with symbols and weightsget_portfolio- Retrieve portfolio details and metricslist_portfolios- List all stored portfoliosdelete_portfolio- Remove a portfolioupdate_portfolio_weights- Modify portfolio weightsclone_portfolio- Create a copy with optional new weights
Analysis Tools (8 tools)
get_portfolio_metrics- Comprehensive metrics (return, volatility, Sharpe, Sortino, VaR)get_returns- Daily, log, or cumulative returnsget_correlation_matrix- Asset correlation analysisget_covariance_matrix- Variance-covariance structureget_individual_stock_metrics- Per-asset statisticsget_drawdown_analysis- Maximum drawdown and recovery analysiscompare_portfolios- Side-by-side portfolio comparison
Optimization Tools (4 tools)
optimize_portfolio- Optimize weights (max Sharpe, min volatility, target return/vol)get_efficient_frontier- Generate efficient frontier curverun_monte_carlo- Monte Carlo simulation for portfolio analysisapply_optimization- Apply optimization and update stored portfolio
Data Tools (8 tools)
generate_price_series- Generate synthetic GBM price datagenerate_portfolio_scenarios- Create multiple scenario datasetsget_sample_portfolio_data- Get sample data for testingget_trending_coins- Trending cryptocurrencies from CoinGeckosearch_crypto_coins- Search for crypto assetsget_crypto_info- Detailed cryptocurrency informationlist_crypto_symbols- Available crypto symbol mappingsget_cached_result- Retrieve cached large results by reference ID
Architecture
portfolio-mcp/
├── app/
│ ├── __init__.py
│ ├── __main__.py # Typer CLI entry point
│ ├── config.py # Pydantic settings
│ ├── server.py # FastMCP server setup
│ ├── storage.py # RefCache-based portfolio storage
│ ├── models.py # Pydantic models for I/O
│ ├── data_sources.py # Yahoo Finance + CoinGecko APIs
│ └── tools/ # MCP tool implementations
│ ├── portfolio.py
│ ├── analysis.py
│ ├── optimization.py
│ └── data.py
└── tests/ # 163 tests, 81% coverageReference-Based Caching
This server uses mcp-refcache to handle large results efficiently:
Large results are cached - When a tool returns data that exceeds the preview size, it's stored in the cache
References are returned - The tool returns a
ref_idand a preview/sample of the dataFull data on demand - Use
get_cached_result(ref_id=...)to retrieve the complete data
This prevents context window bloat when working with large datasets like price histories or Monte Carlo simulations.
Development
Prerequisites
Python 3.12+
uv (recommended) or pip
Setup
# Clone and install
git clone https://github.com/l4b4r4b4b4/portfolio-mcp
cd portfolio-mcp
uv sync
# Run tests
uv run pytest --cov
# Lint and format
uv run ruff check .
uv run ruff format .Running Locally
# stdio mode (for MCP clients)
uv run portfolio-mcp stdio
# SSE mode (for web clients)
uv run portfolio-mcp sse --port 8080
# Streamable HTTP mode
uv run portfolio-mcp streamable-http --port 8080Configuration
Environment variables:
Variable | Description | Default |
| Logging level |
|
| Default cache TTL in seconds |
|
License
MIT License - see LICENSE for details.
Related Projects
mcp-refcache - Reference-based caching for MCP servers
fastmcp-template - Template this project was built from
FinQuant - Financial portfolio analysis library
Available Tools
26 toolsapply_optimizationA
Apply optimization and update portfolio weights.
Optimizes the portfolio using the specified method and updates the stored portfolio with the new optimal weights.
Args: name: The portfolio name. method: Optimization method (same as optimize_portfolio). target_return: Target return for "efficient_return" method. target_volatility: Target volatility for "efficient_volatility" method.
Returns: Updated portfolio information with new weights and metrics.
Example:
result = apply_optimization(name="tech_stocks", method="max_sharpe") print(f"New Sharpe: {result['new_metrics']['sharpe_ratio']:.2f}")
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| method | No | max_sharpe | |
| target_return | No | ||
| target_volatility | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses the tool updates stored portfolio (destructive mutate), returns updated metrics, and includes an example. It does not detail prerequisites or error conditions but provides sufficient behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is structured with Args, Returns, Example sections. It is front-loaded with the main action. While slightly verbose with the example, every sentence adds information and no waste is evident.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema, the return details are adequate. However, the description omits error conditions or validation and could clarify the relationship with 'optimize_portfolio' more explicitly. It is minimally complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description explains all four parameters: name, method, target_return, and target_volatility, including constraints like target_return is for 'efficient_return' method. This adds clear value beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it applies optimization and updates portfolio weights, specifying the optimization method. It distinguishes itself from the sibling 'optimize_portfolio' by noting the method is the same but this tool updates stored weights, effectively differentiating the action.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for applying optimization and persisting results but does not explicitly state when to use this tool versus 'optimize_portfolio' or provide conditions for use. No exclusions or alternatives are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
clone_portfolioA
Clone an existing portfolio, optionally with new weights.
Creates a copy of a portfolio, useful for testing different allocation strategies on the same underlying assets.
Args: source_name: The name of the portfolio to clone. new_name: The name for the cloned portfolio. new_weights: Optional new weights. If None, uses source weights.
Returns: New portfolio information.
Example: ``` # Clone with same weights result = clone_portfolio( source_name="tech_stocks", new_name="tech_stocks_v2" )
# Clone with different weights
result = clone_portfolio(
source_name="tech_stocks",
new_name="tech_aggressive",
new_weights={"GOOG": 0.6, "AMZN": 0.3, "AAPL": 0.1}
)
```| Name | Required | Description | Default |
|---|---|---|---|
| source_name | Yes | ||
| new_name | Yes | ||
| new_weights | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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 explains that cloning creates a copy and optionally changes weights, and describes the return value as 'New portfolio information.' However, it omits details like permissions required, error conditions (e.g., source not found), or side effects on the source portfolio.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a brief intro, Args list, Returns line, and a clear example. It is concise yet informative, with no unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema (context indicates 'Has output schema: true'), the description's brief mention of 'New portfolio information' is acceptable. However, it could mention constraints like source must exist or naming uniqueness, which would improve completeness for a tool with many siblings.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has no descriptions for parameters (0% coverage), and the description fully explains each parameter in the Args section, including the optional new_weights with its default behavior. This adds significant value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Clone an existing portfolio, optionally with new weights.' It identifies the verb (clone) and resource (portfolio), and the context of testing allocation strategies distinguishes it from siblings like create_portfolio or update_portfolio_weights.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description indicates the tool is for copying portfolios for testing different allocation strategies, and includes examples. However, it does not explicitly state when not to use it or compare it to alternatives like create_portfolio for new portfolios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
compare_portfoliosA
Compare multiple portfolios side by side.
Retrieves metrics for multiple portfolios and ranks them by key performance indicators.
Args: names: List of portfolio names to compare.
Returns: Dictionary containing: - portfolios: Dict of metrics per portfolio - rankings: Rankings by each metric - best_by_metric: Best portfolio for each metric
Example:
result = compare_portfolios( names=["stocks", "crypto", "metals"] ) print(f"Best Sharpe: {result['best_by_metric']['sharpe_ratio']}")
| Name | Required | Description | Default |
|---|---|---|---|
| names | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It details the operation (comparison, retrieval) and return format (dictionary with portfolios, rankings, best_by_metric). However, it does not explicitly state it is read-only or mention any side effects, which is a minor gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description uses a clean structure with Args, Returns, and an Example section. Every sentence is purposeful, concise, and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given an output schema exists, the description adequately explains the return structure. For a comparison tool with one parameter, it covers all necessary aspects without overcomplicating.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The param 'names' is described as 'List of portfolio names to compare.' This adds meaning beyond the schema's type (array of strings) and compensates for the 0% schema description coverage. The example further clarifies usage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Compare multiple portfolios side by side' and specifies retrieving metrics and ranking by KPIs. It differentiates from sibling tools like get_portfolio_metrics (single portfolio) and list_portfolios (listing only) by focusing on comparison.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for comparing multiple portfolios via the example and returns section, but does not explicitly state when to use this tool over alternatives or provide when-not conditions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_portfolioA
Create a new portfolio and store it in RefCache.
Creates a portfolio from real market data, provided data, or synthetic data. The portfolio is stored persistently and can be retrieved, analyzed, and optimized.
Args: name: Unique name for the portfolio (e.g., 'stocks', 'crypto'). symbols: List of asset symbols. - For stocks/ETFs: ['AAPL', 'GOOG', 'MSFT', 'SPY'] - For crypto via Yahoo: ['BTC-USD', 'ETH-USD'] - For crypto via CoinGecko: ['BTC', 'ETH', 'SOL'] weights: Optional allocation weights per symbol. Must sum to 1.0. If None, equal weights are used. prices: Optional price data per symbol as dict of lists. If provided, overrides source parameter. dates: Optional list of date strings (ISO format) for price data. Required if prices is provided. days: Number of trading days for synthetic data (default: 252). risk_free_rate: Risk-free rate for calculations (default: 0.02). seed: Random seed for synthetic data generation. source: Data source for prices (default: "synthetic"): - "synthetic": Generate GBM simulated data - "yahoo": Fetch from Yahoo Finance (stocks, ETFs, crypto) - "crypto": Fetch from CoinGecko API (crypto only) period: Period for market data (default: "1y"). Options: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, 10y, ytd, max
Returns: Dictionary containing: - name: Portfolio name - ref_id: RefCache reference ID for retrieval - symbols: List of symbols in the portfolio - weights: Allocation weights - metrics: Initial portfolio metrics (return, volatility, sharpe) - source: Data source used - created_at: ISO timestamp
Example: ``` # Create portfolio with real stock data result = create_portfolio( name="tech_stocks", symbols=["AAPL", "GOOG", "MSFT"], source="yahoo", period="1y" )
# Create crypto portfolio from CoinGecko
result = create_portfolio(
name="crypto_portfolio",
symbols=["BTC", "ETH", "SOL"],
source="crypto"
)
# Create portfolio with synthetic data (for testing)
result = create_portfolio(
name="test_portfolio",
symbols=["A", "B", "C"],
source="synthetic",
seed=42
)
```| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| symbols | Yes | ||
| weights | No | ||
| prices | No | ||
| dates | No | ||
| days | No | ||
| risk_free_rate | No | ||
| seed | No | ||
| source | No | synthetic | |
| period | No | 1y |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description discloses key behaviors: persistent storage, return of metrics, and data source handling. It does not mention potential overwriting if name already exists or any rate limits, but covers the main behavioral traits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with Args, Returns, and Example sections, but is lengthy. It could be slightly more concise while retaining clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 10 parameters, 2 required, and an output schema, the description covers all parameters, return values, and provides multiple comprehensive examples, making it complete for agent invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description fully compensates by explaining each parameter in detail, including examples for symbols, weights, source options, and period format. It adds significant meaning beyond the raw schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it creates a new portfolio and stores it in RefCache, with options for real, provided, or synthetic data. It distinguishes from siblings like clone_portfolio and delete_portfolio by focusing on creation from various data sources.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit examples for different use cases (stock, crypto, synthetic) and explains source options. However, it does not explicitly state when not to use this tool or point to alternatives like generate_price_series for price generation only.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_portfolioA
Delete a stored portfolio.
Permanently removes a portfolio from storage.
Args: name: The portfolio name to delete.
Returns: Dictionary with deletion status.
Example:
result = delete_portfolio(name="old_portfolio") if result['deleted']: print("Portfolio deleted successfully")
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description bears full responsibility. It discloses irreversible deletion ('permanently removes'), which is critical. However, it does not mention potential side effects (e.g., affecting other data), authorization needs, or error handling behavior beyond the example's success case.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is highly concise: two short paragraphs plus a clear code example. Every sentence serves a purpose—specifying action, permanence, parameter, return value, and usage example. No redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one parameter, clear output schema example), the description covers purpose, parameter meaning, return value, and a usage example. It lacks error handling details or mention of whether the portfolio must exist, but for a basic delete tool, it is sufficiently complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% coverage for the 'name' parameter, so the description's docstring ('The portfolio name to delete.') adds essential meaning beyond the schema's type-only definition. The example also clarifies usage. However, no additional constraints like format or existence checks are mentioned.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states 'Delete a stored portfolio. Permanently removes a portfolio from storage.' The verb 'delete' and resource 'portfolio' are explicit, and the specific action (permanent removal) distinguishes it from sibling tools like clone_portfolio or create_portfolio.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for removing portfolios but does not explicitly state when to use this tool versus keeping portfolios, nor does it mention prerequisites or safety checks like ensuring the portfolio exists. The permanence is noted, but no exclusion criteria are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_portfolio_scenariosA
Generate multiple portfolio scenarios with varying parameters.
Useful for testing optimization strategies across different market conditions.
Large results are cached and returned as a reference with preview. Use get_cached_result to paginate through the full scenario data.
Args: base_symbols: List of asset symbols for all scenarios. num_scenarios: Number of different scenarios to generate. days: Number of trading days per scenario. return_range: (min, max) annual return range for random generation. volatility_range: (min, max) annual volatility range. seed: Random seed for reproducibility.
Returns: Dictionary containing: - ref_id: Reference ID for accessing full cached data - num_scenarios: Number of scenarios generated - preview: Sample of scenarios - summary: Summary statistics across scenarios
| Name | Required | Description | Default |
|---|---|---|---|
| base_symbols | Yes | ||
| num_scenarios | No | ||
| days | No | ||
| return_range | No | ||
| volatility_range | No | ||
| seed | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully explains that large results are cached, scenarios are generated randomly using provided ranges, and the return dictionary includes ref_id, preview, and summary. No contradictions or hidden behaviors.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a clear first line, usage hint, and parameter list. However, the parameter list is somewhat verbose and could be trimmed for conciseness without losing clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 6 parameters, one required, no annotations, and an output schema, the description thoroughly covers inputs, caching behavior, and return structure. No missing critical information for an agent to use the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Despite 0% schema description coverage, the description includes an 'Args:' section that explains each parameter's meaning and defaults (e.g., base_symbols as asset symbols, return_range as annual return min/max). This adds substantial value beyond the raw schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Generate' and the resource 'multiple portfolio scenarios,' with explicit mention of varying parameters. It distinguishes itself from siblings by referencing caching and 'get_cached_result' for pagination.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description notes usefulness for testing optimization strategies and instructs to use 'get_cached_result' for full data, providing usage context. However, it does not explicitly list when to avoid this tool or mention alternative tools for different tasks.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_price_seriesA
Generate synthetic price series using Geometric Brownian Motion.
Creates realistic-looking stock price data with customizable parameters for each asset. Supports correlated assets via a correlation matrix.
Large results are cached and returned as a reference with preview. Use get_cached_result to paginate through the full price series.
Args: symbols: List of asset symbols (e.g., ['GOOG', 'AMZN', 'AAPL']). days: Number of trading days to generate (default: 252, one year). initial_prices: Optional initial price per symbol. Defaults to 100.0 for all symbols. annual_returns: Optional expected annual return per symbol. Defaults to 0.08 (8%) for all symbols. annual_volatilities: Optional annual volatility per symbol. Defaults to 0.20 (20%) for all symbols. correlation_matrix: Optional correlation matrix for the assets. Should be a symmetric positive semi-definite matrix. Defaults to identity matrix (uncorrelated). seed: Random seed for reproducibility.
Returns: Dictionary containing: - ref_id: Reference ID for accessing full cached data - symbols: List of symbols - preview: Sample of the price data - total_items: Total number of data points (days) - parameters: Generation parameters used - message: Instructions for pagination
Example: ``` # Generate 1 year of data for 3 tech stocks result = generate_price_series( symbols=["GOOG", "AMZN", "AAPL"], days=252, annual_returns={"GOOG": 0.12, "AMZN": 0.15, "AAPL": 0.10}, annual_volatilities={"GOOG": 0.25, "AMZN": 0.30, "AAPL": 0.22}, seed=42 )
# Use ref_id to paginate
page2 = get_cached_result(ref_id=result["ref_id"], page=2)
```| Name | Required | Description | Default |
|---|---|---|---|
| symbols | Yes | ||
| days | No | ||
| initial_prices | No | ||
| annual_returns | No | ||
| annual_volatilities | No | ||
| correlation_matrix | No | ||
| seed | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses the model (GBM), caching for large results, and pagination via get_cached_result. It also notes that results include a preview and reference ID. However, it does not mention error conditions, rate limits, or any external dependencies, slightly reducing transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections (intro, args, returns, example) and uses concise language. Every sentence adds value, and the example demonstrates typical usage. There is no redundancy or unnecessary detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (7 parameters, caching behavior, output with multiple fields), the description is complete. It explains input parameters thoroughly and describes the return dictionary with all keys. The presence of an output schema signal but actual schema not provided is mitigated by the description's own return documentation. No gaps remain for an AI agent to infer.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage, so the description must fully explain parameters. It provides detailed explanations for all 7 parameters, including defaults, types, and examples (e.g., symbols list, annual_returns dict). This adds substantial meaning beyond the bare schema types and defaults, making it easy for an AI agent to understand each parameter's purpose.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool generates synthetic price series using Geometric Brownian Motion. It defines the core functionality and customizable parameters. However, it does not explicitly differentiate from sibling generation tools like generate_portfolio_scenarios, which could lead to confusion about which to use for price-only data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides implicit usage guidance through examples and parameter explanations, indicating it's used for creating realistic stock price data. It mentions caching and pagination, which helps in subsequent steps. However, there is no explicit guidance on when not to use this tool or alternatives, such as when to prefer generate_portfolio_scenarios for portfolio-level analysis.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_cached_resultA
Retrieve a cached result, optionally with pagination.
Use this to:
Get a preview of a cached value
Paginate through large sequences, price series, or returns data
Access specific pages of a cached result
Args: ref_id: The reference ID returned by tools (e.g., from generate_price_series). page: Page number (1-indexed). If not provided, returns the default preview. page_size: Items per page. Default varies by data type (typically 50).
Returns: Dictionary containing: - ref_id: The reference ID - preview: The data for the current page/preview - preview_strategy: How the preview was generated (sample, truncate, paginate) - total_items: Total number of items in the full dataset - page: Current page number (if paginated) - total_pages: Total pages available (if paginated)
Example: ``` # Generate large price series (returns ref_id + preview) result = generate_price_series(symbols=["AAPL", "GOOG"], days=500)
# Get page 2 of the cached data
page2 = get_cached_result(ref_id=result["ref_id"], page=2, page_size=50)
# Get page 5
page5 = get_cached_result(ref_id=result["ref_id"], page=5)
```| Name | Required | Description | Default |
|---|---|---|---|
| ref_id | Yes | ||
| page | No | ||
| page_size | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It explains caching behavior, pagination mechanics, preview strategies (sample, truncate, paginate), and that it depends on ref_id from other tools. Does not mention side effects or errors, but covers core behaviors well.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is detailed and well-structured with sections (use cases, args, returns, example). However, it is slightly verbose; the example could be shortened. Still, it remains clear and organized.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations, no schema descriptions, but an output schema (return dict explained), the description covers all necessary aspects: purpose, usage, parameters, return values, and examples. It is complete for an AI agent to understand and invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% (no descriptions in schema). Description compensates by explaining ref_id as tool output, page as 1-indexed with default null, and page_size with variable default. Adds meaning beyond type/null constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it retrieves a cached result with optional pagination. It distinguishes itself from siblings by specifying it works with ref_id from tools like generate_price_series, making its purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly lists three use cases: get preview, paginate through large data, and access specific pages. Provides code examples. Does not explicitly exclude misuses or compare to alternatives, but context is sufficient for correct selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_correlation_matrixA
Get the correlation matrix for portfolio assets.
Calculates pairwise correlations between all assets in the
portfolio based on daily returns.
Args:
name: The portfolio name.
Returns:
Dictionary containing:
- symbols: List of symbols
- correlation_matrix: 2D correlation matrix
- correlations: Readable format with symbol pairs
Example:
```
result = get_correlation_matrix(name="tech_stocks")
# Check correlation between GOOG and AMZN
corr = result['correlations']['GOOG']['AMZN']
```Caching Behavior:
Any input parameter can accept a ref_id from a previous tool call
Large results return ref_id + preview; use get_cached_result to paginate
All responses include ref_id for future reference
Preview Size: server default. Override per-call with get_cached_result(ref_id, max_size=...).
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It mentions caching behavior (ref_id, preview, pagination via get_cached_result) and that any input parameter can accept a ref_id. However, it does not explicitly state whether the tool is read-only or any side effects, leaving a gap in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the purpose but includes a verbose caching behavior section that appears generic. The example adds value but lengthens the text. Every sentence has purpose, but the caching block could be shortened or linked to a shared reference.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple tool (one parameter, clear output), the description covers the return format with an example and explains caching mechanics. It does not mention error cases (e.g., invalid portfolio name) but is otherwise complete for basic usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, so the description must compensate. It adds basic meaning by stating that 'name' is the portfolio name. While minimal, this is sufficient for a single parameter, and the example reinforces usage. No further constraints or format details are needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it gets the correlation matrix for portfolio assets and calculates pairwise correlations based on daily returns. The example and distinction from the sibling get_covariance_matrix is implied by the function name, but the description explicitly mentions 'correlation' 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.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like get_covariance_matrix. The description does not specify prerequisites, such as requiring the portfolio to exist or have historical data. It only provides an example but no explicit 'when to use' or 'when not to use' advice.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_covariance_matrixA
Get the covariance matrix for portfolio assets.
Calculates pairwise covariances between all assets in the
portfolio based on daily returns.
Args:
name: The portfolio name.
annualized: If True, annualize the covariance (multiply by 252).
Returns:
Dictionary containing:
- symbols: List of symbols
- covariance_matrix: 2D covariance matrix
- variances: Individual asset variances (diagonal)
Example:
```
result = get_covariance_matrix(name="tech_stocks")
print(f"GOOG variance: {result['variances']['GOOG']}")
```Caching Behavior:
Any input parameter can accept a ref_id from a previous tool call
Large results return ref_id + preview; use get_cached_result to paginate
All responses include ref_id for future reference
Preview Size: server default. Override per-call with get_cached_result(ref_id, max_size=...).
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| annualized | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses return structure (symbols, covariance_matrix, variances), caching behavior (ref_id, preview, pagination), and the effect of annualization. Since no annotations are provided, this is a thorough account of the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description includes a lengthy example and caching notes, which are useful but make it less concise. Could be streamlined without losing essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity and the presence of many sibling tools, the description covers return values, parameters, and caching adequately. It provides enough detail for an agent to use it effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description explains both parameters: name is the portfolio name, and annualized annualizes the covariance by multiplying by 252. This adds meaning beyond the schema, which only has defaults and types.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it computes the covariance matrix for portfolio assets based on daily returns, using a specific verb and resource. However, it does not differentiate from sibling tools like get_correlation_matrix.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives, or when not to use it. The description only describes parameters without context for selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_crypto_infoA
Get detailed information about a cryptocurrency.
Retrieves current price, market cap, volume, and 24h changes.
Args: symbol: Crypto symbol (e.g., 'BTC', 'ETH', 'SOL') or CoinGecko ID.
Returns: Dictionary containing coin information: - id, name, symbol - current_price, market_cap, total_volume - high_24h, low_24h, price_change_24h - market_cap_rank, categories
Example:
result = get_crypto_info(symbol="BTC") print(f"Bitcoin: ${result['current_price']:,.2f}") print(f"24h change: {result['price_change_percentage_24h']:.2f}%")
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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 discloses that the tool retrieves data (read-only), lists returned fields, and includes an example. However, it does not mention authentication needs, rate limits, caching behavior, or potential side effects, which are gaps for a tool without annotation support.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-organized with 'Args' and 'Returns' sections and a useful example. Slightly longer than minimal, but the example adds clarity. Each sentence contributes value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has an output schema (indicated but not shown), so the description's return field list is adequate. Combined with the parameter description and example, it fully explains usage for a simple read operation. No critical gaps identified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, so the description must compensate. It explains that the 'symbol' parameter accepts crypto symbols or CoinGecko IDs, with concrete examples. This adds significant meaning beyond the schema's bare type definition.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The name 'get_crypto_info' clearly indicates retrieving information, and the description states 'Get detailed information about a cryptocurrency' with specific data points (price, market cap, volume, 24h changes). This distinguishes it from sibling tools like 'get_trending_coins' or 'search_crypto_coins' which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description is self-contained but does not explicitly compare to sibling tools or specify when to use this versus alternatives. It provides an example but no guidance on prerequisites or exclusion criteria, relying on implicit understanding from the tool's name.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_drawdown_analysisB
Analyze portfolio drawdowns.
Calculates maximum drawdown and drawdown periods for the
portfolio, useful for risk assessment.
Args:
name: The portfolio name.
Returns:
Dictionary containing:
- max_drawdown: Maximum drawdown percentage
- max_drawdown_period: Start and end dates of max drawdown
- current_drawdown: Current drawdown from peak
- recovery_needed: Percentage gain needed to recover
Example:
```
result = get_drawdown_analysis(name="tech_stocks")
print(f"Max Drawdown: {result['max_drawdown']:.2%}")
```Caching Behavior:
Any input parameter can accept a ref_id from a previous tool call
Large results return ref_id + preview; use get_cached_result to paginate
All responses include ref_id for future reference
Preview Size: server default. Override per-call with get_cached_result(ref_id, max_size=...).
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description includes caching behavior and return value structure, but fails to explicitly state that this is a read-only operation (no destructive hint). Given no annotations, the description should more clearly indicate it does not modify data.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is overly long, including docstring formatting (Args, Returns, Example) and generic caching instructions that are not tool-specific. The core purpose is front-loaded, but the additional text could be trimmed or abstracted to improve conciseness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple nature of the tool (one parameter, clear output described), the description adequately covers what it does and what it returns. However, it could mention that the portfolio must exist before calling this tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The only parameter 'name' is fully explained as 'The portfolio name', adding meaning beyond the bare schema. Since schema coverage is 0% (no property descriptions), the description compensates well for the single parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it analyzes portfolio drawdowns by calculating maximum drawdown and drawdown periods, which is a specific action. However, it does not distinguish itself from sibling tools like 'get_portfolio_metrics' or 'get_correlation_matrix' that may also involve risk assessment.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives such as 'get_portfolio_metrics' or 'run_monte_carlo'. It only mentions it is 'useful for risk assessment', which is too vague to inform tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_efficient_frontierB
Generate efficient frontier data points for visualization.
Calculates points along the efficient frontier, which represents
the set of optimal portfolios offering the highest expected return
for a given level of risk.
Args:
name: The portfolio name.
num_points: Number of points to generate along the frontier.
Returns:
Dictionary containing:
- frontier_points: List of {volatility, expected_return} points
- optimal_sharpe: Maximum Sharpe ratio portfolio
- optimal_min_volatility: Minimum volatility portfolio
- individual_stocks: Individual stock positions
- current_portfolio: Current portfolio position
Example:
```
result = get_efficient_frontier(name="tech_stocks", num_points=100)
# Plot the frontier
for point in result['frontier_points']:
print(f"Vol: {point['volatility']:.2%}, Return: {point['expected_return']:.2%}")
```Caching Behavior:
Any input parameter can accept a ref_id from a previous tool call
Large results return ref_id + preview; use get_cached_result to paginate
All responses include ref_id for future reference
Preview Size: server default. Override per-call with get_cached_result(ref_id, max_size=...).
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| num_points | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It mentions caching behavior and preview size, which are helpful, but it does not explicitly state whether the tool is read-only or if it has side effects. Given the 'get' in the name, safety is implied but not confirmed, and no permissions or limitations are described.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections for Args, Returns, Example, and caching behavior. The example is useful. However, the inclusion of generic caching boilerplate that applies to all tools on the server adds unnecessary length. Overall, it is informative without being overly verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity and the presence of many related sibling tools, the description covers the main aspects: purpose, parameters, return structure, and an example. It does not explicitly differentiate from siblings, but the return structure and visualization focus provide sufficient context. The caching behavior also adds completeness for large datasets.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, so the description compensates well by explaining both parameters: 'name' as the portfolio name and 'num_points' as the number of points. This adds significant value beyond the raw schema, which only specifies types and defaults. However, it does not provide examples of valid values or constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose as generating efficient frontier data points for visualization. The verb 'generate' combined with the specific resource 'efficient frontier' makes the function clear. However, it does not explicitly distinguish this tool from siblings like 'optimize_portfolio' or 'run_monte_carlo', though the visualization focus is implied.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides some context by mentioning 'for visualization', but it lacks explicit guidance on when to use this tool versus alternatives. No exclusions or specific conditions are stated. The agent must infer usage from the general context of portfolio optimization tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_individual_stock_metricsA
Get metrics for each individual stock in a portfolio.
Calculates return and volatility metrics for each stock
separately, useful for identifying best/worst performers.
Args:
name: The portfolio name.
Returns:
Dictionary containing metrics per stock:
- mean_return: Average daily return (annualized)
- volatility: Standard deviation (annualized)
- sharpe_ratio: Individual Sharpe ratio
- weight: Current allocation weight
Example:
```
result = get_individual_stock_metrics(name="tech_stocks")
for symbol, metrics in result['stocks'].items():
print(f"{symbol}: Return={metrics['mean_return']:.2%}")
```Caching Behavior:
Any input parameter can accept a ref_id from a previous tool call
Large results return ref_id + preview; use get_cached_result to paginate
All responses include ref_id for future reference
Preview Size: server default. Override per-call with get_cached_result(ref_id, max_size=...).
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It details return structure, caching behavior (ref_id, preview, pagination), and that any parameter can accept ref_id. This is comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with clear sections (args, returns, example, caching behavior). However, the caching block is somewhat verbose and could be streamlined if generic across tools. Not overly long, but not maximally concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers all aspects: purpose, when to use, parameter explanation, output structure with example, caching behavior. Given the tool's simplicity (1 param, no annotations), the description is fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 1 parameter 'name' with 0% schema description coverage. The description explains 'The portfolio name' and provides an example ('tech_stocks'), adding meaning beyond the raw schema. However, no format constraints or source hints are given.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it gets metrics for each individual stock in a portfolio, distinguishing it from get_portfolio_metrics which gives overall metrics. Uses specific verb 'Get' and resource 'individual stock metrics'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says 'useful for identifying best/worst performers', implying diagnostic use case. While it does not mention when not to use or alternatives, the sibling context makes the distinction clear enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_portfolioA
Get detailed information about a stored portfolio.
Retrieves comprehensive information about a portfolio including its allocation, metrics, and settings.
Args: name: The portfolio name.
Returns: Dictionary containing full portfolio details, or error if not found.
Example:
info = get_portfolio(name="tech_stocks") print(f"Sharpe Ratio: {info['metrics']['sharpe_ratio']}")
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses it is a retrieval operation ('Get') and mentions error on not found, but does not explicitly state non-destructive behavior or any other behavioral traits like caching, auth needs, or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured: brief opening sentence, then Args/Returns/Example sections. No unnecessary text; every sentence adds value. Example is concise and illustrative.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (1 param, output schema exists), the description covers key aspects: purpose, input, output format with example, and error handling. Could add more context on output schema structure or prerequisite (portfolio must exist).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the description only repeats 'The portfolio name.' without adding constraints, format, or referential context (e.g., exact match, case sensitivity). The example provides a concrete value but minimal semantic enrichment.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Get detailed information about a stored portfolio' and specifies the scope as including 'allocation, metrics, and settings,' which differentiates it from sibling tools like get_portfolio_metrics or list_portfolios.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives such as get_portfolio_metrics or compare_portfolios. The description implies use for comprehensive details but lacks explicit differentiation or when-not-to-use advice.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_portfolio_metricsA
Get comprehensive metrics for a portfolio.
Calculates and returns all key portfolio metrics including
risk-adjusted returns, volatility measures, and risk metrics.
Args:
name: The portfolio name.
Returns:
Dictionary containing:
- expected_return: Annualized expected return
- volatility: Annualized volatility (standard deviation)
- sharpe_ratio: Risk-adjusted return (Sharpe)
- sortino_ratio: Downside risk-adjusted return (Sortino)
- value_at_risk: VaR at 95% confidence
- downside_risk: Target downside deviation
- skewness: Skewness per stock
- kurtosis: Kurtosis per stock
- beta: Portfolio beta (if market index available)
- treynor_ratio: Treynor ratio (if beta available)
Example:
```
metrics = get_portfolio_metrics(name="tech_stocks")
print(f"Expected Return: {metrics['expected_return']:.2%}")
print(f"Volatility: {metrics['volatility']:.2%}")
print(f"Sharpe Ratio: {metrics['sharpe_ratio']:.2f}")
```Caching Behavior:
Any input parameter can accept a ref_id from a previous tool call
Large results return ref_id + preview; use get_cached_result to paginate
All responses include ref_id for future reference
Preview Size: server default. Override per-call with get_cached_result(ref_id, max_size=...).
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Despite no annotations, the description reveals key behaviors: it calculates and returns a detailed dictionary with multiple metrics, mentions caching with ref_id and pagination via get_cached_result. However, it does not state that it is read-only or if any side effects exist.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with Args, Returns, and Example sections. The caching behavior block adds length but provides useful context. Could be slightly more concise, but it earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (multiple return fields), the description is comprehensive: it lists all return keys, explains caching, and provides an example. The output schema exists but the description adds full context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The single parameter 'name' is thoroughly described as 'The portfolio name.' in the Args section, and the example provides context. This fully compensates for the lack of schema-level description (0% coverage).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Get comprehensive metrics for a portfolio.' with a specific verb and resource, and lists the included metrics. This distinguishes it from siblings like get_portfolio (basic info) and get_individual_stock_metrics (stock-level).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for obtaining full portfolio metrics but does not explicitly state when not to use it or provide comparisons with sibling tools. No guidance on prerequisites or exclusions, so it is only minimally adequate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_returnsA
Get returns data for a portfolio.
Calculates different types of returns from the portfolio's
price data.
Args:
name: The portfolio name.
return_type: Type of returns to calculate:
- "daily": Daily percentage returns
- "log": Daily log returns
- "cumulative": Cumulative returns from start
as_percentage: If True, multiply by 100 for percentage display.
Returns:
Dictionary containing:
- return_type: The type of returns calculated
- dates: List of date strings
- returns: Dict of returns per symbol
- portfolio_returns: Weighted portfolio returns
- statistics: Summary statistics (mean, std, min, max)
Example:
```
# Get daily returns
result = get_returns(name="tech_stocks", return_type="daily")
# Get cumulative returns for growth chart
result = get_returns(name="tech_stocks", return_type="cumulative")
```Caching Behavior:
Any input parameter can accept a ref_id from a previous tool call
Large results return ref_id + preview; use get_cached_result to paginate
All responses include ref_id for future reference
Preview Size: server default. Override per-call with get_cached_result(ref_id, max_size=...).
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| return_type | No | daily | |
| as_percentage | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full responsibility for behavioral transparency. It discloses caching behavior (ref_id, pagination via get_cached_result) and return structure, but does not mention any side effects or read-only nature. The caching info adds valuable context beyond what annotations would provide.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with sections for Args, Returns, Example, and Caching Behavior. Every sentence adds value, and the example is concise yet illustrative. No redundant content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema (though not shown in the input, context indicates it exists), the description still provides a detailed Returns section. It covers caching and pagination. A minor gap is the lack of error handling or prerequisite mention (e.g., portfolio existence), but overall it is sufficiently complete for a straightforward data retrieval tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, but the description compensates fully by explaining each parameter: name, return_type (with explicit enum-like values), and as_percentage (with meaning). This adds significant semantic value beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose as 'Get returns data for a portfolio' and specifies different return types (daily, log, cumulative). It distinguishes itself from sibling tools like get_portfolio_metrics by focusing specifically on return calculations, and the examples further clarify use cases.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides examples and explains each parameter clearly, including different return_type options and the as_percentage flag. However, it does not explicitly contrast with alternative tools (e.g., get_portfolio_metrics) or state when not to use this tool, which would enhance guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_sample_portfolio_dataA
Get pre-defined sample portfolio data for quick testing.
Returns sample data for a diversified portfolio with realistic parameters based on historical market behavior.
Returns: Dictionary with sample portfolio data ready for use with create_portfolio().
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It states the tool returns sample data (read operation) with realistic parameters, implying no side effects or destructive actions. It does not elaborate on data limits or mutability, but the simplicity of the tool makes this adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise: two sentences plus a bullet point. The main purpose is stated in the first sentence ('get pre-defined sample portfolio data for quick testing'), making it front-loaded. No unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (no parameters, clear output schema), the description is complete. It specifies the tool returns sample portfolio data for testing, and ties it to a sibling tool (create_portfolio). The output schema exists and is referenced, so explanation of return values is unnecessary.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the description does not need to add parameter detail. According to the guidelines, for 0 parameters the baseline score is 4. The description adds value by specifying the output is a dictionary ready for create_portfolio().
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves pre-defined sample portfolio data for testing. It uses a specific verb ('get') and resource ('sample portfolio data'), distinguishing it from sibling tools like create_portfolio which actually create portfolios.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description indicates usage for 'quick testing' and explicitly mentions the output is 'ready for use with create_portfolio()', providing clear guidance on when to use this tool (testing) and how to chain it with another tool. It does not specify when not to use it, but the context is sufficient.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_trending_coinsA
Get trending cryptocurrencies from CoinGecko.
Returns a list of coins that are trending in the last 24 hours, useful for discovering popular assets to analyze.
Returns: Dictionary containing: - coins: List of trending coin info (id, name, symbol, rank) - fetched_at: ISO timestamp
Example:
result = get_trending_coins() for coin in result['coins']: print(f"{coin['name']} ({coin['symbol']})")
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description explains the read-only behavior of fetching trending data, including the return structure (coins, fetched_at). Without annotations, this adequately conveys the tool's behavior and side-effect-free nature.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, front-loaded with the main purpose, and includes a helpful example in just a few lines. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a parameterless tool with a simple output, the description fully covers what the tool does, what it returns, and how to use it. No additional information is necessary.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With zero parameters, the schema coverage is 100%. The description adds no parameter details as none are needed, meeting the baseline expectation for a no-parameter tool.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves trending cryptocurrencies from CoinGecko, specifying the 24-hour timeframe. This distinguishes it from sibling tools like search_crypto_coins or list_crypto_symbols.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description notes the tool is 'useful for discovering popular assets to analyze', providing a clear use case. However, it does not explicitly mention when to avoid using it or alternatives, but the simplicity makes this less critical.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
health_checkA
Check server health status.
Returns server health information including cache status and number of stored portfolios.
Returns: Health status information.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description should disclose read-only nature, performance, or failure modes. It implies read-only but does not explicitly state safety or side effects. It provides return details but lacks behavioral completeness.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise: two sentences plus a returns line. No wasted words. Front-loaded with the core action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no parameters and presence of an output schema, the description covers the essential purpose and returns. It is complete enough for this simple tool, though it could mention typical use cases.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and schema coverage is 100%, so baseline is 4. No additional parameter info is needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool checks server health status and lists specific return values (cache status, stored portfolio count). It is a distinct operation among sibling tools focused on portfolio actions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs. alternatives. The description does not mention contexts such as diagnostics or monitoring, nor does it exclude other tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_crypto_symbolsA
List supported cryptocurrency symbols and their CoinGecko IDs.
Returns the mapping of common crypto symbols (like BTC, ETH) to their CoinGecko API identifiers.
Returns: Dictionary containing: - symbols: Dict mapping symbol to CoinGecko ID - count: Number of supported symbols - usage: How to use with create_portfolio
Example:
result = list_crypto_symbols() print(f"Supported: {list(result['symbols'].keys())[:10]}...")
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided; description discloses return format and example but doesn't explicitly state it's read-only or safe. Adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description includes docstring-style Returns and Example sections, which is slightly verbose. Could be more concise while retaining clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Fully describes return value (symbols, count, usage), provides example, and integrates with create_portfolio. Output schema exists to cover details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters in schema; coverage is 100%. Description adds no param info, but baseline for zero-param tools is 4. No need for further explanation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool lists supported crypto symbols and CoinGecko IDs. It differentiates from siblings like search_crypto_coins and get_crypto_info.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Description implies use for getting symbols to use with create_portfolio via the 'usage' field, but lacks explicit when-to-use or when-not-to-use compared to alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_portfoliosA
List all stored portfolios with summary information.
Returns a list of all portfolios in the store with their key metrics and metadata.
Returns: Dictionary containing: - portfolios: List of portfolio summaries - count: Number of portfolios
Example:
result = list_portfolios() for pf in result['portfolios']: print(f"{pf['name']}: Sharpe={pf['metrics']['sharpe']:.2f}")
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden for behavioral disclosure. It describes the output structure but does not mention side effects, authorization requirements, rate limits, or data freshness. The description meets basic transparency but lacks deeper details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise at about 100 words, including an example. It is well-structured: a clear first-line purpose, followed by details, then an illustrative example. Every sentence adds value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 params, simple list operation) and the presence of an output schema (not shown but indicated), the description covers the essential aspects: what it returns (list of portfolios with metrics), including count. It provides sufficient context for the agent to understand the tool's action.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameters, so the description does not need to explain parameters. According to guidelines, a baseline of 4 is appropriate when no parameters exist. The description does not add any parameter information, but none is needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'List all stored portfolios with summary information,' specifying the verb, resource, and scope. It distinguishes from sibling tools like get_portfolio (single portfolio) and create_portfolio, and includes an example that reinforces its purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for listing all portfolios, but it does not provide explicit guidance on when to use this tool versus alternatives (e.g., get_portfolio for a specific portfolio) or when not to use it. The usage context is implied by sibling tool names but not directly stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
optimize_portfolioA
Optimize portfolio weights using Efficient Frontier.
Finds optimal portfolio weights based on the specified optimization
method. Uses numerical optimization (scipy) to find the solution.
Args:
name: The portfolio name.
method: Optimization method:
- "max_sharpe": Maximize Sharpe ratio (default)
- "min_volatility": Minimize portfolio volatility
- "efficient_return": Minimize volatility for target return
- "efficient_volatility": Maximize return for target volatility
target_return: Required for "efficient_return" method.
The target annualized return to achieve.
target_volatility: Required for "efficient_volatility" method.
The target annualized volatility.
Returns:
Dictionary containing:
- method: Optimization method used
- optimal_weights: Dict of optimal weights per symbol
- expected_return: Expected return of optimal portfolio
- volatility: Volatility of optimal portfolio
- sharpe_ratio: Sharpe ratio of optimal portfolio
- original: Original portfolio metrics for comparison
- improvement: Improvement over original portfolio
Example:
```
# Maximize Sharpe ratio
result = optimize_portfolio(name="tech_stocks", method="max_sharpe")
# Minimize volatility
result = optimize_portfolio(name="tech_stocks", method="min_volatility")
# Target 15% return with minimum volatility
result = optimize_portfolio(
name="tech_stocks",
method="efficient_return",
target_return=0.15
)
```Caching Behavior:
Any input parameter can accept a ref_id from a previous tool call
Large results return ref_id + preview; use get_cached_result to paginate
All responses include ref_id for future reference
Preview Size: server default. Override per-call with get_cached_result(ref_id, max_size=...).
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| method | No | max_sharpe | |
| target_return | No | ||
| target_volatility | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, but the description discloses the use of numerical optimization (scipy), the return structure, and includes caching behavior (preview, pagination). It does not mention side effects, but this appears to be a read-only computation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with Args, Returns, and Example sections. The first sentence is clear. Some redundancy exists, and the caching note adds length, but overall it's efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
All parameters and return values are documented. Examples illustrate usage. The caching behavior is noted. Missing is a mention of prerequisites (e.g., portfolio must exist), but the tool is still sufficiently complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Despite 0% schema description coverage, the description provides full meaning for all four parameters: name, method (with enum-like list), target_return, and target_volatility. Conditions and defaults are clearly stated.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Optimize portfolio weights using Efficient Frontier' and details four optimization methods. It distinguishes from sibling tools like apply_optimization and get_efficient_frontier by focusing on computing optimal weights without applying them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains when to use each method and what parameters are needed. It lacks explicit guidance on alternatives, but the context of sibling tools provides implicit differentiation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
run_monte_carloA
Run Monte Carlo simulation to find optimal portfolios.
Generates random portfolio weight combinations and evaluates their risk/return characteristics to find optimal allocations.
Note: This is computationally intensive. For large num_trials, consider using the Efficient Frontier method instead which provides mathematically optimal solutions.
Args: name: The portfolio name. num_trials: Number of random portfolios to generate (default: 5000).
Returns: Dictionary containing: - num_trials: Number of simulations run - min_volatility_portfolio: Portfolio with minimum volatility - max_sharpe_portfolio: Portfolio with maximum Sharpe ratio - simulation_stats: Statistics about the simulation - sample_portfolios: Sample of generated portfolios
Example:
result = run_monte_carlo(name="tech_stocks", num_trials=10000) best = result['max_sharpe_portfolio'] print(f"Best Sharpe: {best['sharpe_ratio']:.2f}") print(f"Optimal weights: {best['weights']}")
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| num_trials | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description carries full burden. It discloses computational intensity as a behavioral trait, but does not mention side effects, permissions, or data sources. Nonetheless, it provides sufficient context for a simulation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with an intro, a performance note, clear Arg/Returns sections, and an example. Every sentence adds value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity and the presence of an output schema, the description fully explains what the tool does, its performance implications, and the structure of its return values, including an example that clarifies usage. It is sufficient to differentiate from 25+ sibling tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has no descriptions for its parameters (0% coverage), but the description's Args block explains that 'name' is the portfolio name and 'num_trials' is the number of simulations with a default of 5000, adding essential meaning beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool runs Monte Carlo simulations to find optimal portfolios by generating random weight combinations and evaluating risk/return. It distinguishes itself from the Efficient Frontier method, implying this is for random sampling approaches, which differentiates it from sibling tools like 'optimize_portfolio' or 'get_efficient_frontier'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly notes that the tool is computationally intensive and advises using the Efficient Frontier method for large num_trials, providing clear guidance on when not to use this tool and a specific alternative.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_crypto_coinsA
Search for cryptocurrencies on CoinGecko.
Find coins by name, symbol, or keyword. Useful for discovering coin IDs to use with create_portfolio.
Args: query: Search query (e.g., 'bitcoin', 'defi', 'layer 2').
Returns: Dictionary containing: - coins: List of matching coins (id, name, symbol, market_cap_rank) - count: Number of results - fetched_at: ISO timestamp
Example:
# Search for DeFi coins result = search_crypto_coins(query="defi") for coin in result['coins']: print(f"{coin['name']} ({coin['symbol']}) - Rank: {coin['market_cap_rank']}")
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full responsibility. It details the return structure (coins list, count, fetched_at) and provides an example. It does not mention rate limits or authentication, but the tool appears simple and read-only, and the description sufficiently conveys its behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise but complete, with clear sections for purpose, parameters, returns, and an example. Every sentence adds value, and the important information is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (single parameter, no nested objects) and the fact that an output schema is described in the returns section, the description provides all necessary context for an agent to use the tool effectively, including input format and output structure.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The only parameter, query, is well-explained with a description and concrete examples ('bitcoin', 'defi', 'layer 2'), adding significant value beyond the bare schema definition. Schema coverage is 0%, so the description compensates fully.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states the tool searches for cryptocurrencies by name, symbol, or keyword. It explicitly distinguishes itself by mentioning its utility for discovering coin IDs to use with create_portfolio, differentiating it from siblings like get_crypto_info or get_trending_coins.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives a specific use case (finding coin IDs for create_portfolio) and implies appropriate scenarios via the example. However, it does not explicitly exclude cases where other tools might be better, such as using get_crypto_info for detailed coin data once the ID is known.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_portfolio_weightsA
Update the allocation weights of an existing portfolio.
Changes the weight distribution across assets in a portfolio and recalculates all metrics.
Args: name: The portfolio name. weights: New allocation weights per symbol. Must sum to 1.0.
Returns: Updated portfolio information with new metrics.
Example:
result = update_portfolio_weights( name="tech_stocks", weights={"GOOG": 0.5, "AMZN": 0.3, "AAPL": 0.2} ) print(f"New Sharpe: {result['metrics']['sharpe_ratio']}")
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| weights | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so description must cover behavioral traits. It mentions recalculation of metrics and a constraint (weights sum to 1.0), but does not disclose mutation permanence, required permissions, or side effects on other portfolio attributes.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with Args, Returns, and an example. The Returns line is generic but the example compensates. No superfluous text; each part serves a purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity and presence of an output schema, the description covers the main purpose, parameters, constraint, and provides an example. However, it does not differentiate from related optimization tools, which would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description explains both parameters: 'name: The portfolio name' and 'weights: New allocation weights per symbol. Must sum to 1.0.' This adds essential meaning, including the summation constraint, which is not in the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states 'Update the allocation weights of an existing portfolio' and explains that it changes weight distribution and recalculates metrics. This verb-resource pairing is specific and distinguishes it from creation or deletion tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for updating weights but does not specify when to use this tool versus alternatives like apply_optimization or optimize_portfolio. No explicit when-not or exclusion criteria are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a distinct purpose: portfolio CRUD, analysis, optimization, data generation, crypto info, and utility. There is minimal overlap; even related tools like optimize_portfolio and apply_optimization are clearly differentiated.
Tool names follow a consistent verb_noun pattern (e.g., create_portfolio, get_portfolio_metrics, list_portfolios). The few phrase-based names like health_check are minor deviations but do not detract from overall clarity.
26 tools is a comprehensive but well-scoped set for a portfolio management server. Each tool addresses a specific aspect of portfolio creation, analysis, optimization, or data retrieval without redundancy.
The tool surface covers CRUD, analysis, optimization, data generation, and crypto support. Minor gaps exist, such as no tool for adding/removing individual assets or importing/exporting data, but core workflows are well-supported.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server giving AI agents one-connection access to crypto & DeFi data: DeFi protocol TVL, stableco
The Octagon MCP server provides specialized AI-powered financial research and analysis by integrating with the Octagon Market Intelligence API. It enables users to analyze public market data (SEC filings, earnings transcripts, financial metrics, and stock data for 8000+ companies), private market data (3M+ companies, 500k+ funding rounds, 2M+ M&A/IPO transactions), and conduct deep research including web scraping capabilities. The server also features autonomous research agents that search hundreds of sources and return fully cited reports in approximately one minute.
MCP server exposing the Backtest360 engine API as tools for AI agents.
Real SEC, 13F, insider, congress & macro data your AI agent can cite. Hosted MCP, 24 tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server for tracking and managing cryptocurrency portfolio allocations, enabling AI agents to query and optimize portfolio strategies in real time.10MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that enables AI agents to query real-time financial data including stock quotes, market indices, company fundamentals, and portfolio tracking.MIT
- AlicenseBqualityCmaintenanceAn enhanced MCP server that provides financial data and analysis tools for stocks, crypto, precious metals, and more, empowering AI agents with professional financial intelligence, including backtesting, ASCII charts, and simulated portfolios.585MIT
- FlicenseNot gradedqualityCmaintenanceA Model Context Protocol server for managing and analyzing investment portfolios. It enables users to create and update portfolios, fetch real-time stock data and news, generate performance reports, and receive investment recommendations through natural language.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/l4b4r4b4b4/portfolio-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server