Skip to main content
Glama

analyze_portfolio

Compute total invested, current value, P&L, XIRR, sector concentration, risk flags, and diversification score for a portfolio of holdings.

Instructions

Portfolio X-ray: deep risk + return analysis for your holdings.

Input format — list of holdings: [ {"symbol": "RELIANCE", "qty": 10, "avg_price": 2400, "buy_date": "2024-01-15"}, {"symbol": "TCS", "qty": 5, "avg_price": 3800} ]

Returns:

  • total invested, current value, P&L, P&L %

  • XIRR (if buy_date provided)

  • per-holding breakdown with sector

  • sector concentration % (flags if > 40% in one sector)

  • risk flags: pledged promoters, single stock > 30%, FII reducing

  • diversification score (0–100)

Args: holdings: list of {symbol, qty, avg_price, buy_date (optional)}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
holdingsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It describes the analysis and return values but does not explicitly state that the tool is read-only or non-destructive. It also omits details on rate limits, data freshness, or error handling. For an analysis tool, the disclosure is adequate but not thorough.

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

Conciseness4/5

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

The description is well-structured with an intro, input format, and output list. It is reasonably concise but could be trimmed slightly (e.g., the output list could be more compact). Overall, it balances detail and readability.

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

Completeness3/5

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

Given the tool's complexity and that an output schema exists (though not shown), the description covers key return values. However, it lacks details on error cases, data sources, or time periods for analysis. The presence of sibling tools like 'portfolio_analysis' suggests potential gaps in scope differentiation.

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

Parameters5/5

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

The input schema has 0% description coverage, leaving parameters undefined. The description compensates fully by specifying the required fields (symbol, qty, avg_price) and the optional buy_date, along with a concrete example and array format. This adds essential meaning beyond the generic schema.

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?

The description clearly states it performs 'deep risk + return analysis for your holdings' and lists specific outputs like P&L, XIRR, sector concentration, and risk flags. This makes the tool's purpose specific and actionable. However, it does not explicitly differentiate from the sibling tool 'portfolio_analysis', which may cause ambiguity.

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?

The description lacks explicit guidance on when to use this tool versus alternatives. With many sibling tools, especially 'portfolio_analysis', it does not explain scenarios where one is preferred over the other. No 'use this when' or 'instead of' hints are provided.

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/finstacklabs/finstack-mcp'

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