Skip to main content
Glama
Finance Toolkit

Finance Toolkit

etf

Read-onlyIdempotent

Analyze fund holdings, profiles, tracking, concentration, overlap, liquidity, valuation, and contribution metrics by ticker to compare funds and assess exposures.

Instructions

Analysis of ETFs and other funds. Requires tickers='VOO' — use comma-separated values for several funds; tickers that are not an ETF or fund return no data. get_holdings: the 25 largest holdings of each fund by weight (shares, weight and market value) unless limit= asks for more, limit=-10 for the smallest; the holdings carry no sector or country, so use get_sector_weightings and get_country_weightings for those breakdowns, or the Finance Database server to classify the holdings. get_information: everything published about each fund, including its identifiers, description and website. get_profile: name, issuer, asset class, domicile, inception date, expense ratio, assets under management, NAV, latest price, premium/discount to NAV (the close of the NAV's own date against the NAV; empty for a NAV that is not current unless stale_nav=true), holdings count and average (dollar) volume. get_tracking: tracking difference (annualized return gap, about minus the expense ratio for an index fund), tracking error, correlation, beta and R Squared against benchmark_ticker (set it to the fund's index or another fund of the same index, e.g. benchmark_ticker='SPY' for VOO); yearly=true gives the gap per calendar year. get_concentration: number of holdings, largest holding, top 10 weight, Herfindahl-Hirschman index and effective number of holdings. get_overlap: the overlap of every pair of funds (sum of the smaller weight over shared holdings). get_active_share: the active share of every pair of funds (half the sum of the absolute weight differences, 0 for identical and 1 for unrelated holdings; e.g. tickers='MGK,VOO' for a fund against its index). get_look_through_valuation: weighted (harmonic) P/E, P/B, P/S and P/FCF, dividend yield and net margin of the largest holdings (holdings=25) with the coverage. get_liquidity: average volume and dollar volume, dollar volume to assets and the price impact per $100 million traded (Amihud). get_contribution: how much every holding (group_by='sector' for every sector) added to or took off the fund's price return from the close before start_date to end_date, as Start Weight, Return, Contribution and Points (of the fund's price, or of an index with index='^GSPC' for SPY), largest first, then the Remainder (cash, unpriced holdings) and the Total; the weights are the current holdings rolled back to the start, so short recent periods are the most precise. get_return_excluding: the fund's return without its largest holding, or without the holdings or sectors of exclude= (e.g. exclude='NVDA,Technology'), next to the return of all priced holdings. Both price the holdings one request each (holdings= limits that to the largest).

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": {
      "indicator": "<indicator>"
    },
    "name": "etf"
  }
}

Input Schema

NameRequiredDescriptionDefault
rankNotrue ranks the tickers (or countries) within every period, from the highest value (rank 1) to the lowest, and compares each with its neighbour toward the middle of the ranking: the Difference (in points for returns) and the Multiple (only when both have the same sign), so the first and last rank show how far the best and the worst stand apart, e.g. a fall more than twice as large as the next one. Needs a value per period and ticker; pick one field with show_columns where there are more.
indexNoThe ticker of an index whose level at the start of the period converts the contributions into index points, e.g. "^GSPC" for SPY.
limitNoThe rows to return, like head and tail: 5 for the first five, -5 for the last five (the most recent of a time series). A table with its periods as columns (financial statements, ratios) keeps its first or last periods instead, and rows per ticker (an earnings calendar) are selected per ticker. For ETF holdings the largest (or, negative, the smallest) by weight, and for a list (e.g. news or a screener) its length. 0 returns every row. Leave unset to use the default of the indicator you selected. Defaults are 25 for get_holdings.
periodNoObservation frequency, e.g. 'daily', 'weekly', 'monthly', 'quarterly', or 'annual' (supported values differ per method).daily
yearlyNoWhether to return the tracking difference per year.
excludeNoThe holdings (tickers, e.g. "NVDA") and sectors (e.g. "Technology", as the companies' profiles name them) to leave out.
tickersNoComma-separated ticker symbols, e.g. 'AAPL,MSFT,GOOGL'.
end_dateNoEnd of the date range in YYYY-MM-DD format; left empty, today (or the indicator's own window).
group_byNo"holding" for every holding or "sector" for every sector (from the holdings' company profiles).holding
holdingsNoFor get_contribution: The number of largest holdings (by weight) to price, one request each; the rest counts towards the Remainder. For get_look_through_valuation: The number of largest holdings to value per fund. For get_return_excluding: The number of largest holdings (by weight) to price, one request each; the rest counts towards the rest of the fund. Leave unset to use the default of the indicator you selected. Defaults are 500 for get_contribution, get_return_excluding; 25 for get_look_through_valuation.
indicatorYesName of the specific metric to calculate, one of the listed values. Required — search_metrics finds the indicator (and its tool) for a metric by name.
quarterlyNoReturn quarterly data instead of annual when True.
stale_navNoWhether to give the premium for a NAV that is not current, comparing it with the nearest close available.
start_dateNoStart of the date range in YYYY-MM-DD format; left empty, five years before today (or the indicator's own window).
show_columnsNoComma-separated names to filter the output. For historical data use the key names visible in any response record (e.g. 'Close,Volume,Return'). For financial statements use the 'metric' field values from the response (e.g. 'Revenue,Net Income,EBITDA'). Call the tool once without this parameter to see all available names, then repeat with show_columns to reduce response size and token usage.
benchmark_tickerNoTicker used as the market benchmark, e.g. 'SPY' or '^GSPC'; 'None' for no benchmark.SPY

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.3.4
    • addedInput schema / properties / rank
      Added value: +{
      +  "default": false,
      +  "description": "true ranks the tickers (or countries) within every period, from the highest value (rank 1) to the lowest, and compares each with its neighbour toward the middle of the ranking: the Difference (in points for returns) and the Multiple (only when both have the same sign), so the first and last rank show how far the best and the worst stand apart, e.g. a fall more than twice as large as the next one. Needs a value per period and ticker; pick one field with show_columns where there are more.",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changedv2.3.3
    • changedInput schema / properties / exclude / description
      Previous value: -"The holdings (tickers, e.g. \"NVDA\") and sectors (e.g. \"Technology\", as the companies' profiles name them) to leave out. Leave unset to use the default of the indicator you selected. Required by: get_return_excluding."New value: +"The holdings (tickers, e.g. \"NVDA\") and sectors (e.g. \"Technology\", as the companies' profiles name them) to leave out."
  3. Changed9 schema fields changedv2.3.2
    • addedInput schema / properties / exclude
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "The holdings (tickers, e.g. \"NVDA\") and sectors (e.g. \"Technology\", as the companies' profiles name them) to leave out. Leave unset to use the default of the indicator you selected. Required by: get_return_excluding."
      +}
    • addedInput schema / properties / group_by
      Added value: +{
      +  "default": "holding",
      +  "description": "\"holding\" for every holding or \"sector\" for every sector (from the holdings' company profiles).",
      +  "type": "string"
      +}
    • addedInput schema / properties / holdings / anyOf
      Added value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / holdings / default
      Previous value: -25New value: +null
    • changedInput schema / properties / holdings / description
      Previous value: -"The number of largest holdings to value per fund."New value: +"For get_contribution: The number of largest holdings (by weight) to price, one request each; the rest counts towards the Remainder. For get_look_through_valuation: The number of largest holdings to value per fund. For get_return_excluding: The number of largest holdings (by weight) to price, one request each; the rest counts towards the rest of the fund. Leave unset to use the default of the indicator you selected. Defaults are 500 for get_contribution, get_return_excluding; 25 for get_look_through_valuation."
    • removedInput schema / properties / holdings / type
      Removed value: -"integer"
    • addedInput schema / properties / index
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "The ticker of an index whose level at the start of the period converts the contributions into index points, e.g. \"^GSPC\" for SPY."
      +}
    • changedInput schema / properties / indicator / enum
      Previous value: -[
      -  "get_concentration",
      -  "get_country_weightings",
      -  "get_holdings",
      -  "get_information",
      -  "get_liquidity",
      -  "get_look_through_valuation",
      -  "get_overlap",
      -  "get_profile",
      -  "get_sector_weightings",
      -  "get_tracking"
      -]New value: +[
      +  "get_active_share",
      +  "get_concentration",
      +  "get_contribution",
      +  "get_country_weightings",
      +  "get_holdings",
      +  "get_information",
      +  "get_liquidity",
      +  "get_look_through_valuation",
      +  "get_overlap",
      +  "get_profile",
      +  "get_return_excluding",
      +  "get_sector_weightings",
      +  "get_tracking"
      +]
    • changedInput schema / properties / limit / description
      Previous value: -"The rows to return, like head and tail: 5 for the first five, -5 for the last five (the most recent of a time series). A table with its periods as columns (financial statements, ratios) keeps its first or last periods instead. For ETF holdings the largest (or, negative, the smallest) by weight, and for a list (e.g. news or a screener) its length. 0 returns every row. Leave unset to use the default of the indicator you selected. Defaults are 25 for get_holdings."New value: +"The rows to return, like head and tail: 5 for the first five, -5 for the last five (the most recent of a time series). A table with its periods as columns (financial statements, ratios) keeps its first or last periods instead, and rows per ticker (an earnings calendar) are selected per ticker. For ETF holdings the largest (or, negative, the smallest) by weight, and for a list (e.g. news or a screener) its length. 0 returns every row. Leave unset to use the default of the indicator you selected. Defaults are 25 for get_holdings."
  4. Changed6 schema fields changedv2.3.1
    • changedInput schema / properties / benchmark_ticker / description
      Previous value: -"Ticker used as the market benchmark, e.g. 'SPY' or '^GSPC'."New value: +"Ticker used as the market benchmark, e.g. 'SPY' or '^GSPC'; 'None' for no benchmark."
    • changedInput schema / properties / end_date / default
      Previous value: -"2026-10-27"New value: +""
    • changedInput schema / properties / end_date / description
      Previous value: -"End of the date range in YYYY-MM-DD format."New value: +"End of the date range in YYYY-MM-DD format; left empty, today (or the indicator's own window)."
    • changedInput schema / properties / limit / description
      Previous value: -"The rows to return, like head and tail: 5 for the first five, -5 for the last five (the most recent of a time series). A table with its periods as columns (financial statements, ratios) keeps its first or last periods instead. For ETF holdings the largest (or, negative, the smallest) by weight, and for a list (e.g. news or a screener) its length. Leave unset to use the default of the indicator you selected. Defaults are 25 for get_holdings."New value: +"The rows to return, like head and tail: 5 for the first five, -5 for the last five (the most recent of a time series). A table with its periods as columns (financial statements, ratios) keeps its first or last periods instead. For ETF holdings the largest (or, negative, the smallest) by weight, and for a list (e.g. news or a screener) its length. 0 returns every row. Leave unset to use the default of the indicator you selected. Defaults are 25 for get_holdings."
    • changedInput schema / properties / start_date / default
      Previous value: -"2021-10-28"New value: +""
    • changedInput schema / properties / start_date / description
      Previous value: -"Start of the date range in YYYY-MM-DD format."New value: +"Start of the date range in YYYY-MM-DD format; left empty, five years before today (or the indicator's own window)."
  5. Addedv2.3.0

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the readOnly/openWorld annotations, it discloses real behavioral traits: non-ETF tickers return no data, premium/discount is empty unless the NAV is current or stale_nav=true, get_contribution weights are rolled back so short periods are most precise, and get_contribution/get_return_excluding cost one pricing request per holding (capped by holdings=). That is unusually rich cost and edge-case disclosure for a 15-indicator dispatcher.

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

Conciseness3/5

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

It is front-loaded with purpose and the required tickers argument, and nearly every clause conveys unique information, so length is largely justified. But the 15 indicators are packed into one dense semicolon-delimited block, making it hard to scan for a specific indicator's contract.

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 16-parameter multi-indicator tool with an output schema and full annotation coverage, the description supplies per-indicator outputs, defaults, cost notes and edge cases. The remaining gap is cross-tool routing against sibling tools that duplicate some indicators.

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?

With schema coverage at 100%, the baseline is 3, but the description adds interpretation the schema lacks: limit=-10 meaning smallest holdings, the default of 25 for get_holdings, which indicators holdings= applies to, and how benchmark_ticker should be chosen for get_tracking. It does not cover the dormant parameters (rank, period, quarterly, show_columns) that belong to other indicators.

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

Purpose4/5

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

Opens with a specific subject ('Analysis of ETFs and other funds') and then enumerates each of the 15 indicators with concrete outputs (holdings, tracking difference, HHI, Amihud price impact), so an agent knows exactly what the tool computes. It does not, however, distinguish this tool from siblings such as 'overlap' or 'liquidity', which appear to cover overlapping ground via get_overlap/get_liquidity indicators.

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?

It clearly states the entry requirement ('Requires tickers='VOO'') and non-ETF behavior, and routes within the tool (use get_sector_weightings/get_country_weightings because holdings carry no sector or country; set benchmark_ticker to the fund's index). It gives no guidance on when to pick this tool rather than the sibling overlap/liquidity/valuation tools.

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