Skip to main content
Glama
aswathas

TradeMCP

by aswathas

trademcp_analyze_portfolio

Read-onlyIdempotent

Analyze Indian equity holdings to value positions, compute profit/loss and allocation, assess sector concentration and benchmark-relative risk, and flag concentration or signal risks.

Instructions

Analyse an Indian equity portfolio.

Values every holding at the latest price, computes profit and loss, weight and sector concentration, adds each stock's technical signal, then measures the portfolio against the benchmark (beta, annualised volatility, Sharpe, max drawdown) and flags concentration or signal risk.

Args: holdings: list of positions with symbol, quantity and optional cost price benchmark: benchmark index for risk metrics response_format: 'markdown' or 'json'

Returns: Markdown or JSON with 'holdings', 'allocation', 'risk', 'performance' and 'flags'.

Input Schema

NameRequiredDescriptionDefault
holdingsYesPositions to analyse, e.g. [{'symbol':'RELIANCE','quantity':10,'cost_price':1200}]
benchmarkNoBenchmark index: 'NIFTY 50' or 'SENSEX'NIFTY 50
response_formatNo'markdown' or 'json'markdown

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds useful context about latest-price valuation, benchmark comparison, and risk flagging, but does not discuss data freshness, external service dependencies, or rate limits beyond what annotations imply.

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 front-loaded with purpose and structured into purpose, Args, and Returns sections. It is efficient overall, though the Args and Returns sections partially repeat information already available in the schema and output schema.

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

Completeness4/5

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

For a complex portfolio-analysis tool, the description covers the input concepts and the major output areas (holdings, allocation, risk, performance, flags). With an output schema present and annotations covering safety, the remaining gap is minor: it does not mention data limitations or error behavior.

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 description coverage is 100%, so the schema already documents holdings, benchmark, response_format, and nested Holding fields. The description's Args section largely mirrors that information and adds no new syntax or constraints beyond the schema.

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 states a specific verb and resource: it analyses an Indian equity portfolio, then enumerates valuation, P&L, concentration, technical signals, benchmark risk metrics, and risk flags. This clearly distinguishes it from sibling tools that fetch single-stock or market-wide data.

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

Usage Guidelines4/5

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

The opening sentence and workflow give clear context for when to use the tool: portfolio-level analysis. It does not name explicit alternatives or exclusions, but the scope is sufficiently clear that an agent can select it for portfolio analysis versus single-stock tools.

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