Skip to main content
Glama
tanmaymish

MarketPulse MCP

by tanmaymish

analyze_portfolio

Calculate returns, risk, and diversification for your stock holdings. Receive P&L, XIRR, sector concentration, and risk flags to spot potential problems.

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
Behavior4/5

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

With no annotations, the description carries the burden and does well by disclosing conditional behaviors: XIRR only if buy_date provided, sector concentration flag at >40%, single stock >30% flag, and FII reducing risk. It doesn't cover error handling or data freshness, but the disclosed behaviors are substantial.

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

Conciseness5/5

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

The description is well-structured with sections for input format, returns, and args. The example is concise and relevant. Every sentence contributes meaning, with no fluff or redundancy.

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

Completeness5/5

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

This is a complex analytical tool, but the description covers input structure, optional fields, return metrics, and risk flag thresholds. Since an output schema exists, the return-value description is a bonus, making the tool fully self-contained for an agent.

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 schema has zero descriptions, but the description compensates with a concrete JSON example and an Args section that defines the structure of each holding, including optional buy_date. This is a strong addition beyond the schema's bare 'additionalProperties: true' array.

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

Purpose5/5

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

The description opens with 'Portfolio X-ray: deep risk + return analysis for your holdings,' which clearly states the tool's function using a specific verb and resource. It differentiates this tool from single-stock tools like stock_quote and even the sibling portfolio_analysis by emphasizing risk flags, sector concentration, and diversification scoring.

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

Usage Guidelines4/5

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

The description clearly indicates when to use it: when a user provides a list of holdings for return and risk analysis. It includes the input format and expected output. However, it does not explicitly mention alternatives or when not to use it, so it stops short of a perfect score.

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/tanmaymish/MarketPulse-MCP'

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