Skip to main content
Glama
Portfolio Analytics MCP

Portfolio Analytics MCP

by RugSec

get_etf_sector_allocation

Read-only

Retrieve sector allocation percentages for an ETF or fund from Yahoo, ordered largest first, to analyze portfolio sector exposure; for European UCITS ETFs, use exposure by ISIN instead.

Instructions

Sector allocation (% by sector) of an ETF or fund, from Yahoo.

Yahoo coverage of European UCITS ETFs is patchy: for those, prefer
get_etf_exposure (justETF, by ISIN).

Args:
    ticker: Yahoo symbol of the fund, e.g. "SPY", "IWDA.AS".

Returns:
    `sector_allocation_pct` by sector, largest first; or an error dict.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "ticker": "<ticker>"
    },
    "name": "get_etf_sector_allocation"
  }
}

Input Schema

NameRequiredDescriptionDefault
tickerYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety and external-data behavior are covered. The description adds useful behavioral context beyond annotations: results are ordered largest-first and an error dict is returned when data is unavailable.

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?

Front-loads the purpose, immediately adds the sibling-routing caveat, and uses compact Args/Returns blocks. Every sentence earns its place with no repetition of schema or annotations.

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?

For a one-parameter read-only lookup with no output schema, the description covers source, return shape/order, error behavior, ticker format, and the main alternative for European UCITS ETFs. An agent has enough information to call it correctly or route elsewhere.

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 0% and the only parameter is an undescribed ticker string. The description compensates by defining it as a Yahoo symbol of the fund and giving examples like "SPY" and "IWDA.AS", which conveys exchange-suffix format without fully documenting edge cases such as non-Yahoo identifiers.

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 a specific verb/resource: returns sector allocation (% by sector) of an ETF or fund from Yahoo. It also distinguishes itself from get_etf_exposure by naming the European UCITS ETF case where a different sibling is preferable.

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

Usage Guidelines5/5

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

Explicitly says Yahoo coverage of European UCITS ETFs is patchy and that callers should prefer get_etf_exposure (justETF, by ISIN) for those. This gives a clear when-to-use-vs-alternative rule rather than leaving routing to inference.

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