Skip to main content
Glama

finance_portfolio_tracker

Calculate portfolio value and allocation from holdings data to track financial investments and analyze asset distribution.

Instructions

Calculate portfolio value and allocation from a list of holdings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
holdingsYesComma-separated holdings: 'BTC:0.5,ETH:10,SOL:100' or 'AAPL:50,MSFT:30'

Implementation Reference

  • The implementation of the finance_portfolio_tracker tool, which parses a comma-separated list of holdings and returns a markdown table of the portfolio.
    server.tool("finance_portfolio_tracker", "Calculate portfolio value and allocation from a list of holdings", {
      holdings: z.string().describe("Comma-separated holdings: 'BTC:0.5,ETH:10,SOL:100' or 'AAPL:50,MSFT:30'")
    }, async ({ holdings }) => {
      const items = holdings.split(",").map(h => {
        const [asset, qty] = h.trim().split(":");
        return { asset: asset.trim(), qty: parseFloat(qty) || 0 };
      });
      const rows = items.map(i => [i.asset.toUpperCase(), i.qty.toString(), "Pending lookup", "Pending"]);
      return { content: [{ type: "text", text: `**Portfolio Tracker**\n\n${mdTable(["Asset", "Qty", "Price", "Value"], rows)}\n\n*Use crypto_price or finance_stock_price to look up individual prices, then calculate total.*` }] };
    });
Behavior2/5

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

No annotations provided, so description carries full burden. States 'Calculate' implying read-only computation, but omits critical behavioral details: data source/freshness, supported asset types (crypto vs stocks), error handling for invalid symbols, and output format (especially important since no output schema exists).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, front-loaded with verb, no wasted words. However, minimal length means it fails to convey necessary behavioral context that would require additional structured detail.

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

Completeness2/5

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

Without output schema or annotations, description should specify return format (total value, allocation percentages, currency). Also missing scope (supports both crypto tickers like BTC and stock tickers like AAPL as shown in schema, but not mentioned in description).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with detailed examples ('BTC:0.5,ETH:10'). Description mentions 'list of holdings' but adds no semantic detail beyond what the schema already provides. Baseline 3 appropriate for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clear verb ('Calculate') and resource ('portfolio value and allocation'), with 'from a list of holdings' distinguishing it from single-asset siblings like crypto_price and finance_stock_price. However, it doesn't explicitly contrast when to use this versus aggregating single-price lookups manually.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use guidance or alternatives mentioned. Doesn't indicate whether this is preferred over multiple calls to crypto_price for aggregate calculations, or if it requires specific formatting (though schema covers this).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ElromEvedElElyon/claw-mcp-toolkit'

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