Skip to main content
Glama
Arnavshah22

indstocks-mcp

by Arnavshah22

Analyze portfolio allocation and concentration

analyze_allocation

Calculate portfolio allocation weights, concentration (HHI, effective holdings), and sector grouping from NSE classifications. Optionally compare to a target to reveal drift.

Instructions

Compute allocation weights and concentration (HHI, effective holdings count) over a list of positions. Deterministic — computed in code, not estimated. Grouping by sector uses NSE's published macro-economic classification looked up by ISIN or symbol, not a sector you supply; instruments outside that index are reported as Unclassified and counted rather than guessed at. Optionally compare against a target allocation to show drift.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNoOptional target weights, e.g. {"Financials": 30, "IT": 20}
groupByNosymbol
positionsYes
Install Server

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and covers it well: deterministic not estimated, sector classification sourced from NSE macro-economic data rather than user input, and unclassified instruments are reported/counted rather than guessed. This is strong behavioral disclosure.

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?

Every clause earns its place: deterministic behavior, classification source, unclassified handling, and optional target comparison are all functional for selection and invocation. Information is front-loaded with the core computation.

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 tool with no output schema, the description lists the computed metrics and drift comparison, which is reasonably complete. However, the exact output shape/format is not specified, and given no annotations, slightly more return-value detail would help.

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

Parameters4/5

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

Schema coverage is only 33%, but the description compensates for key parameters: target is explained as optional comparison for drift, groupBy sector is tied to NSE classification by ISIN/symbol, and positions are described as the list to compute over. It leaves some exact format details to 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?

States specific verb 'Compute', resource 'allocation weights and concentration', and names concrete outputs HHI and effective holdings count. This clearly differentiates it from sibling tools like get_holdings or compute_xirr.

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 conveys clear context: use for allocation/concentration over a list of positions, with optional target drift comparison and standard sector grouping. It does not explicitly name exclusions or alternatives, so not a 5.

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

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/Arnavshah22/indstocks-mcp'

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