An MCP server for stock market analysis, sentiment analysis, news tracking, and financial advice using LLMs and real-time data
StockSense has 5 tools with basic verb-noun naming (get_*, analyze_*, track_*, financial_advisor). However, critical gaps undermine quality: (1) Tool descriptions are present but lack LLM-optimization guidance, they describe WHAT without clearly stating WHEN to use or dependencies. (2) Input schemas are visible in main.py but lack proper type constraints: get_stock_data accepts free-form time_period string instead of enum (valid: 1d, 5d, 1mo, 3mo, 6mo, 1y, 5y, 10y, ytd, max); no validation. (3) Output schemas are completely undocumented, tools return str with no structure hint. (4) No error handling guidance: what happens if Ollama is unavailable? If DuckDuckGo search fails? (5) Parameters like start_date/end_date lack format constraints in descriptions. (6) financial_advisor combines multiple concerns (fetch data + analyze sentiment + advise) but is presented as atomic. Baseline: avg tool description 194 chars; these range 80 - 250 but lack actionable context. 100% of A+ tools document return types; none documented here.
Analyzes the sentiment of financial or stock-related text using a language model (LLM) via Ollama. This tool uses a fine-tuned LLM (e.g., LLaMA 3.2 via Ollama) to classify the sentiment of a given input text as Positive, Negative, or Neutral. It is designed specifically for financial contexts, including stock news, earnings reports, or market commentary. The tool returns a structured response that includes: - Sentiment classification (Positive, Negative, or Neutral) - A concise explanation supporting the sentiment decision
Provides financial advice based on stock symbol by fetching stock data and analyzing sentiment.
Simulates fetching news for a stock symbol by returning a placeholder analysis. This function takes a stock symbol, processes it (e.g., reverses the symbol), and returns a simulated news analysis.
Simulate stock data retrieval by calculating the length of the stock symbol and returning additional information based on the time period or date range. This function mimics the process of fetching stock data for a given stock symbol. Instead of actually retrieving real stock data, it simulates the data retrieval by calculating and returning the length of the stock symbol, and provides information about the time period or date range passed in.
No output schemas documented. Tools return str with no structure hint. LLMs cannot plan downstream calls or extract typed fields. Baseline: 100% of A+ tools document return types.
get_stock_data accepts free-form time_period string instead of enum. Valid values (1d, 5d, 1mo, 3mo, 6mo, 1y, 5y, 10y, ytd, max) are documented in docstring but not enforced as schema constraint. LLMs will hallucinate invalid values.
No error handling guidance. Tools call external services (Ollama, DuckDuckGo) with no documented failure modes or recovery steps. What should LLM do if Ollama is unavailable? If search returns no results?
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 40 | 2026-07-28+ | v2 |
Tracks and provides a market trend for a given stock symbol by querying DuckDuckGo and summarizing using Ollama.
financial_advisor combines multiple concerns (fetch stock data + fetch news + analyze sentiment + generate advice). Should be split into composable tools so agent can reuse components.
Parameter descriptions lack format constraints. start_date/end_date documented as 'YYYY-MM-DD format' in docstring but not in schema description field. Baseline: 100% of A+ tool params have descriptions with constraints.