Skip to main content
Glama

scrape_stock

Fetch stock data from Yahoo Finance: quotes, historical prices, or company profiles. Select the mode for the information you need.

Instructions

Fetch stock market data from Yahoo Finance and return it as a dict.

The returned shape depends on mode:

  • "quote": {"symbol", "currency", "exchange", "price", "previous_close", "volume", "day_high", "day_low", "fifty_two_week_high", "fifty_two_week_low"}.

  • "history": {"symbol", "period", "rows": [{"date", "open", "high", "low", "close", "volume"}, ...]}.

  • "profile": {"symbol", "name", "currency", "exchange", "market", "timezone", "instrument_type"}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoString selecting what to fetch; one of "quote", "history", "profile". Example: "quote". Default: "quote".quote
periodNoString history window, used only when mode="history" and ignored otherwise; one of "1d", "5d", "1mo", "3mo", "6mo", "1y", "2y", "5y", "10y", "ytd", "max". Example: "1y". Default: "1mo".1mo
symbolYesTicker symbol as a string. Example: "AAPL". No default (required).
intervalNoCandle size for history bars, used only when mode="history"; one of "1d", "1wk", "1mo". Example: "1wk". Default: "1d".1d

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
countNo
errorsNo
scraperNo
source_urlsNo
Behavior4/5

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

With no annotations, the description carries the full burden. It thoroughly discloses return shapes for each mode, which is the primary behavioral aspect. It doesn't mention rate limits or error handling, but the read-only nature is implied by 'fetch' and the output specification is detailed.

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 well-structured and front-loaded with the main action. It efficiently uses a list format to convey return keys, and every sentence serves a purpose without redundancy.

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 output schema exists and the description explicitly defines the return dict for all three modes, the description is comprehensive. Parameter schema is also thorough, so no critical gaps remain.

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 input schema already has 100% coverage with detailed descriptions for each parameter. The description adds value by explaining how mode affects the output shape, but this is a logical inference rather than new parameter semantics. Baseline 3 is appropriate.

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 verb 'fetch' and the resource 'stock market data from Yahoo Finance', and specifies the return type as a dict. It also distinguishes this tool from siblings like scrape_url and get_crypto by focusing on stocks from a specific source.

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?

The description provides clear context: it is for fetching stock data from Yahoo Finance. It doesn't explicitly mention alternatives or when not to use it, but the domain is specific enough for an agent to infer appropriate use.

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/mldsveda/PyScrappy'

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