Skip to main content
Glama

get_portfolio_concentration

Read-onlyIdempotent

Calculates Herfindahl index and top N holdings percentage to assess portfolio concentration risk, with alerts for excessive single-stock exposure.

Instructions

分析目前投資組合的集中度風險,回傳 Herfindahl 指數、前 N 大部位佔比、集中度警示與建議(例如單一股票占比過高)。資料來自使用者實際持股,以台幣計價。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNNo前 N 大部位要呈現(1-20,預設 5)
Behavior4/5

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

Annotations mark the tool as read-only and idempotent. The description adds value by detailing the outputs (Herfindahl index, top N, alerts) and confirming data source and currency, providing behavioral context beyond annotations.

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 concise with two sentences, front-loading the core purpose and outputs. No superfluous content.

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?

Given the tool's complexity and the absence of an output schema, the description adequately explains inputs, outputs, and data source. No additional clarifications needed.

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?

The single parameter topN is fully described in the schema (range 1-20, default 5). The description does not add extra semantic meaning beyond the schema, achieving baseline coverage.

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 clearly states the tool analyzes portfolio concentration risk and returns specific metrics (Herfindahl index, top N positions, alerts). It distinguishes itself from sibling portfolio tools by focusing specifically on concentration.

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

Usage Guidelines3/5

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

The description indicates the tool uses actual holdings in TWD but does not explicitly specify when to use it over alternatives like get_portfolio or get_portfolio_score. Usage context is implied but lacks explicit guidance.

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/kevinlin49361128-stack/stock-analyzer-mcp'

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