robinhood_get_watchlist
Retrieve the list of stocks in a named Robinhood watchlist for portfolio analysis. Specify the watchlist name or use the default.
Instructions
Get stocks in a watchlist.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Watchlist name (default: "Default") | Default |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/robinhood_mcp/server.py:135-145 (handler)MCP tool handler for robinhood_get_watchlist. Decorated with @mcp.tool(), delegates to get_watchlist() helper after checking authentication.
@mcp.tool() def robinhood_get_watchlist(name: str = "Default") -> list: """Get stocks in a watchlist. Args: name: Watchlist name (default: "Default") Returns list of watchlist items with instrument details. """ _ensure_logged_in() return get_watchlist(name) - src/robinhood_mcp/server.py:135-145 (schema)Input schema defined via function signature: name (str, default 'Default'). Output is list.
@mcp.tool() def robinhood_get_watchlist(name: str = "Default") -> list: """Get stocks in a watchlist. Args: name: Watchlist name (default: "Default") Returns list of watchlist items with instrument details. """ _ensure_logged_in() return get_watchlist(name) - src/robinhood_mcp/server.py:121-137 (registration)Tool registered via @mcp.tool() decorator on line 121 (applied to the function definition).
@mcp.tool() def robinhood_get_position(symbol: str) -> dict: """Get one current stock position with a faster single-symbol lookup. Args: symbol: Stock ticker symbol (e.g., "HIMS", "AAPL") Returns a dict with held=False if absent, otherwise the position details for that symbol including quantity, price, average buy price, and P&L. """ _ensure_logged_in() return get_position(symbol) @mcp.tool() def robinhood_get_watchlist(name: str = "Default") -> list: """Get stocks in a watchlist. - src/robinhood_mcp/tools.py:230-240 (helper)Core implementation: calls rh.account.get_watchlist_by_name wrapped in _safe_call error handling. Returns list of watchlist items or empty list.
def get_watchlist(name: str = "Default") -> list[dict[str, Any]]: """Get stocks in a watchlist. Args: name: Watchlist name (default: "Default"). Returns: List of watchlist items with instrument details. """ result = _safe_call(rh.account.get_watchlist_by_name, name=name) return result if isinstance(result, list) else []