Skip to main content
Glama
lkcair

yfinance-ai MCP server

by lkcair

run_self_test

Read-onlyIdempotent

Verify all yfinance-ai tools are working by running 64 checks and reporting pass/fail status with sample data per financial data category.

Instructions

Run comprehensive self-test of the yfinance-ai tools (64 checks).

This function is designed to be called by AI assistants to verify that all tools are working correctly. It tests each tool category, reports success/failure status, and shows sample data from each test.

Args: ticker: Ticker symbol to use for testing (default: SPY - reliable ETF with full data)

Returns: Comprehensive test report with pass/fail status and sample data for all tools

Example AI Prompt: "Run self-test on yfinance tools" "Test all financial data functions" "Verify yfinance-ai is working"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tickerNoSPY

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds meaningful behavior beyond them: it tests each tool category, reports pass/fail, and shows sample data. It omits runtime/cost characteristics, which matters for a tool running 64 checks, but the diagnostic behavior is otherwise well disclosed.

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?

Front-loaded with the core purpose, then structured Args/Returns and example prompts. Slightly verbose with three example prompts, but every section is useful and nothing is redundant.

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?

An output schema exists, so the description needn't detail return formatting, and it adequately covers the tool's behavior, parameter, and intended use. Minor gap: it doesn't hint at expected duration or what a failing check implies.

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 description coverage is 0%, so the description must compensate, and it does: the single 'ticker' parameter is explained with its role ('Ticker symbol to use for testing') and a justified default (SPY – reliable ETF with full data). It is not fully exhaustive but adds real value over the bare schema.

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?

States a specific verb+resource ('Run comprehensive self-test of the yfinance-ai tools') with scope (64 checks), and is easily distinguished from the data-fetching siblings since it is the only diagnostic/verification tool in the list.

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?

Explicitly frames the intended caller ('designed to be called by AI assistants to verify that all tools are working correctly') and provides example prompts like 'Verify yfinance-ai is working'. It gives clear context for when to reach for it, though it doesn't state when NOT to use it (e.g., as a substitute for individual data calls).

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