Skip to main content
Glama
yantrix-ai

@praveen030686/data-apis-mcp

Get Stock Price

finance_stock_price
Read-onlyIdempotent

Retrieve real-time stock prices with key metrics like day high/low, volume, and 52-week range for US stocks, ETFs, and indices using micropayments.

Instructions

Get real-time stock price with day high/low, volume, 52-week range, and market state. Costs $0.02 USDC per request via x402 on Base. Supports all major US stocks, ETFs, and indices.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesStock ticker (e.g., AAPL, MSFT, GOOGL, TSLA, AMZN)

Implementation Reference

  • The tool 'finance_stock_price' is defined here. It accepts a 'symbol' argument and fetches data from the finance API.
    server.registerTool(
      "finance_stock_price",
      {
        title: "Get Stock Price",
        description: `Get real-time stock price with day high/low, volume, 52-week range, and market state.
    Costs $0.02 USDC per request via x402 on Base.
    Supports all major US stocks, ETFs, and indices.`,
        inputSchema: {
          symbol: z.string().min(1).max(10).describe("Stock ticker (e.g., AAPL, MSFT, GOOGL, TSLA, AMZN)"),
        },
        annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
      },
      async ({ symbol }) => {
        const data = await apiFetch(`${FINANCE_API}/api/v1/stocks/price/${symbol.toUpperCase()}`);
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
      }
    );
Behavior4/5

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

Annotations already indicate read-only, non-destructive, idempotent, and open-world behavior. The description adds valuable context beyond annotations: it discloses the cost ('$0.02 USDC per request via x402 on Base'), which is critical for usage decisions. It also specifies supported asset types (US stocks, ETFs, indices), but does not mention rate limits or authentication requirements.

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 highly concise and front-loaded: the first sentence states the core functionality, the second adds critical cost information, and the third clarifies scope. Every sentence earns its place with no wasted words, and the structure efficiently conveys key details.

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?

Given the tool's moderate complexity (single parameter, no output schema), the description is mostly complete. It covers purpose, cost, and supported assets, which are essential for an AI agent. However, it lacks details on response format (e.g., what fields are returned) and error handling, which would be helpful despite the absence of an output schema.

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 has 100% description coverage, with the 'symbol' parameter well-documented (ticker examples provided). The description does not add any parameter-specific information beyond what the schema already states. According to guidelines, with high schema coverage (>80%), the baseline score is 3 when no additional param info is provided in the description.

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 tool's purpose with specific details: 'Get real-time stock price' (verb+resource) and lists additional data points (day high/low, volume, 52-week range, market state). It distinguishes from siblings like finance_stock_financials (financial data) and finance_stock_profile (company profile) by focusing on price and market metrics.

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 for when to use this tool: for real-time stock price data with specific market metrics. It mentions support for 'all major US stocks, ETFs, and indices,' which helps scope usage. However, it does not explicitly state when NOT to use it or name specific alternatives among siblings (e.g., finance_stock_financials for financial statements).

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/yantrix-ai/x402-apis-mcp-server'

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