Skip to main content
Glama
yfinance-agent-mcp

yfinance-agent-mcp

by n-kostadinov

Get sector or industry

get_sector_industry
Read-only

Retrieve sector or industry overviews, leading companies, top ETFs/funds, and industry performers or growth companies for market research.

Instructions

Who leads a sector or industry: overview, top companies, top ETFs and funds.

Sectors also list their industries; industries add top performers (YTD return, target price) and top growth companies.

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": {
      "kind": "<kind>",
      "key": "<key>"
    },
    "name": "get_sector_industry"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesSector key (basic-materials, communication-services, consumer-cyclical, consumer-defensive, energy, financial-services, healthcare, industrials, real-estate, technology, utilities) or an industry key such as 'semiconductors' (listed in a sector's `industries`).
kindYes'sector' or 'industry'.
response_formatNo'concise' (default; up to 20,000 characters) or 'detailed' (up to 80,000).concise

Output Schema

NameRequiredDescriptionDefault
keyYes
kindYes'sector' or 'industry'.
nameNo
as_ofYesWhen this data was fetched from Yahoo Finance, in UTC.
sourceNoData source and the yfinance version.
overviewYesCompany count, market cap, market weight, description...
top_etfsNo
warningsNoCaveats such as delayed quotes, symbols that failed, or trimmed results.
truncatedNoTrue when rows were left out to keep the response small.
industriesNoA sector's industries; pass a key back as an industry.
sector_keyNoParent sector, for an industry.
next_offsetNoPass as `offset` to fetch the next rows, when the result is truncated.
sector_nameNo
top_companiesNo
top_mutual_fundsNo
top_growth_companiesNo
top_performing_companiesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety profile is covered. The description adds real behavioral context by explaining that a sector response enumerates its industries while an industry response adds YTD return, target price and top growth companies — shaping what the caller can expect. It does not mention freshness/latency, coverage gaps, or authentication, and the size limits live only in the schema.

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?

Two tight sentences, front-loaded with the core purpose and followed by the sector-vs-industry distinction. Nothing is padded or restated from the title, and every clause carries information the caller needs.

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?

With an output schema present, return structure need not be spelled out, and the description covers both entity kinds plus their differing payloads. For a 3-parameter read-only lookup this is nearly complete; only cross-tool routing guidance and data freshness are absent.

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 100% and the enum for `kind` with examples for `key` are already fully documented. The description still adds meaning by tying `kind` to different result shapes (industries nested under a sector; performers and growth companies under an industry), which helps the agent pick the right kind. It slightly exceeds the baseline 3 that full schema coverage would justify.

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?

The description opens with a specific verb and resource ('Who leads a sector or industry') and enumerates the content returned: overview, top companies, top ETFs and funds. It clearly separates the two supported entity kinds. It stops short of naming how it differs from ticker-oriented siblings such as get_fundamentals or get_analyst_view, leaving that to inference.

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?

Usage is implied by the phrase 'Who leads a sector or industry', which signals a leadership/rankings lookup rather than a quote or fundamentals call. However, there is no explicit when-to-use or when-not-to-use statement, and no alternative tool is named for overlapping needs like screening or symbol lookup.

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