Skip to main content
Glama
yfinance-agent-mcp

yfinance-agent-mcp

by n-kostadinov

Screen securities

screen_securities
Read-only

Screen securities using predefined Yahoo screens or custom queries to find matching stocks, ETFs, or funds, with key price, volume, and market-cap data returned for review.

Instructions

Find candidates: run a predefined Yahoo screen or a custom query.

Each row has symbol, name, price, change %, volume, 3-month average volume, market cap and exchange. total is how many securities match in all.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "screen_securities"
  }
}

Input Schema

NameRequiredDescriptionDefault
countNoRows to return.
queryNoA custom screen instead of a preset: {"operator": "and", "operands": [{"operator": "gt", "operands": ["percentchange", 3]}, {"operator": "eq", "operands": ["region", "us"]}]}. Operators: and, or, eq, gt, lt, gte, lte, btwn, is-in.
presetNoA predefined Yahoo screen, e.g. 'day_gainers' or 'most_actives'.
ascendingNo
sort_fieldNoYahoo field to sort by, e.g. 'percentchange'.
security_typeNoWhat a custom query screens.equity
response_formatNo'concise' (default; up to 20,000 characters) or 'detailed' (up to 80,000).concise

Output Schema

NameRequiredDescriptionDefault
rowsYes
as_ofYesWhen this data was fetched from Yahoo Finance, in UTC.
titleNo
totalNoHow many securities match in total.
screenYesPredefined screen name, or 'custom'.
sourceNoData source and the yfinance version.
warningsNoCaveats such as delayed quotes, symbols that failed, or trimmed results.
truncatedNoTrue when rows were left out to keep the response small.
next_offsetNoPass as `offset` to fetch the next rows, when the result is truncated.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/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 the safety profile is covered. The description does add real value by clarifying that `total` is the full match count rather than the number of returned rows — important given the count cap — but it says nothing about sorting behavior, result truncation, or how count interacts with total.

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

Conciseness4/5

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

Two short sentences, with the core action front-loaded before the row-shape detail. The field enumeration in sentence two is slightly mechanical but earns its place by telling the agent what comes back without opening the output schema.

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 and 86% schema coverage, the description needn't restate return values, and it covers the essential two-mode semantics plus the meaning of `total`. Minor gaps remain around preset/query exclusivity, sort direction interaction, and the 25-row cap on returned vs. matching counts.

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?

Schema description coverage is 86%, so the schema already documents count, query syntax with operators, preset examples, sort_field, and response_format limits. The description's phrase "a predefined Yahoo screen or a custom query" maps to preset/query but adds no syntax, format, or interaction detail beyond the schema, so the baseline 3 applies.

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?

"Find candidates: run a predefined Yahoo screen or a custom query" names a specific verb-plus-resource and immediately captures the two modes the tool supports, distinguishing it from sibling getters like get_quotes or search_symbols. It stops short of explicitly naming an alternative it is not, so it lands at 4 rather than 5.

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 states the two operating modes but never says when to prefer a preset over a custom query, whether they are mutually exclusive, or how this differs from search_symbols for discovery. Usage is implied by "Find candidates" rather than spelled out.

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