robinhood_get_dividends
Retrieve all dividend payments received from your Robinhood portfolio, including amount, payable date, record date, and instrument details for portfolio analysis.
Instructions
Get all dividend payments received.
Returns list of dividend payments with amount, payable date, record date, and instrument details.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/robinhood_mcp/tools.py:351-358 (handler)Core implementation of get_dividends() that calls rh.account.get_dividends via _safe_call and returns the result list.
def get_dividends() -> list[dict[str, Any]]: """Get all dividend payments received. Returns: List of dividend payments with amount, payable_date, record_date, etc. """ result = _safe_call(rh.account.get_dividends) return result if isinstance(result, list) else [] - src/robinhood_mcp/server.py:237-245 (handler)FastMCP tool registration for robinhood_get_dividends - decorated with @mcp.tool(), calls get_dividends() from tools module.
@mcp.tool() def robinhood_get_dividends() -> list: """Get all dividend payments received. Returns list of dividend payments with amount, payable date, record date, and instrument details. """ _ensure_logged_in() return get_dividends() - src/robinhood_mcp/tools.py:24-46 (helper)Helper _safe_call() used to invoke robin_stocks functions with error handling.
def _safe_call(func: Callable[..., Any], *args, **kwargs) -> Any: """Safely call a robin_stocks function with error handling. Args: func: The robin_stocks function to call. *args: Positional arguments. **kwargs: Keyword arguments. Returns: The function result. Raises: RobinhoodError: If the call fails. """ try: result = func(*args, **kwargs) if result is None: raise RobinhoodError("API returned None - you may need to login first") return result except RobinhoodError: raise except Exception as e: raise RobinhoodError(f"API call failed: {e}") from e - src/robinhood_mcp/server.py:12-27 (registration)Import of get_dividends from tools module into server.py.
from .tools import ( RobinhoodError, get_dividends, get_earnings, get_fundamentals, get_historicals, get_news, get_options_positions, get_portfolio, get_position, get_positions, get_quote, get_ratings, get_watchlist, search_symbols, ) - src/robinhood_mcp/server.py:14-14 (registration)get_dividends imported in the import statement of server.py.
get_dividends,