robinhood_get_fundamentals
Get fundamental data for a stock by providing its ticker symbol, enabling key financial metrics analysis for portfolio research.
Instructions
Get fundamental data for a stock.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Stock ticker symbol |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/robinhood_mcp/server.py:162-173 (handler)MCP tool handler for robinhood_get_fundamentals. Decorated with @mcp.tool(), it validates login via _ensure_logged_in() then delegates to get_fundamentals(symbol) from tools.py.
@mcp.tool() def robinhood_get_fundamentals(symbol: str) -> dict: """Get fundamental data for a stock. Args: symbol: Stock ticker symbol Returns fundamentals including P/E ratio, market cap, dividend yield, 52-week high/low, and more. """ _ensure_logged_in() return get_fundamentals(symbol) - src/robinhood_mcp/tools.py:260-274 (helper)Core implementation of get_fundamentals. Normalizes the symbol, calls robin_stocks.robinhood.stocks.get_fundamentals via _safe_call, and returns the first result if it's a list, otherwise raises RobinhoodError.
def get_fundamentals(symbol: str) -> dict[str, Any]: """Get fundamental data for a stock. Args: symbol: Stock ticker symbol. Returns: Fundamentals including pe_ratio, market_cap, dividend_yield, etc. """ symbol = _normalize_symbol(symbol) result = _safe_call(rh.stocks.get_fundamentals, symbol) if isinstance(result, list) and len(result) > 0: return result[0] raise RobinhoodError(f"No fundamentals found for symbol: {symbol}") - src/robinhood_mcp/server.py:162-163 (registration)Tool registration via @mcp.tool() decorator on the handler function robinhood_get_fundamentals.
@mcp.tool() def robinhood_get_fundamentals(symbol: str) -> dict: - src/robinhood_mcp/server.py:162-162 (schema)Type signature: symbol: str -> dict (typed via the handler's signature).
@mcp.tool()