Skip to main content
Glama
drasticstatic

robinhood-mcp

robinhood_get_options_positions

Retrieve all current options positions from your Robinhood account, including chain symbol, option type, strike price, expiration date, and quantity for portfolio analysis.

Instructions

Get all current options positions (read-only).

Returns list of options positions with chain symbol, type, strike price, expiration, and quantity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The actual handler function `get_options_positions()` that calls the robin_stocks library's `rh.options.get_open_option_positions` via `_safe_call` and returns the list of options positions.
    def get_options_positions() -> list[dict[str, Any]]:
        """Get all current options positions.
    
        Returns:
            List of options positions with chain_symbol, type, quantity, etc.
        """
        result = _safe_call(rh.options.get_open_option_positions)
        return result if isinstance(result, list) else []
  • The MCP tool registration where `robinhood_get_options_positions` is decorated with `@mcp.tool()` and calls the handler after ensuring login.
    @mcp.tool()
    def robinhood_get_options_positions() -> list:
        """Get all current options positions (read-only).
    
        Returns list of options positions with chain symbol, type,
        strike price, expiration, and quantity.
        """
        _ensure_logged_in()
        return get_options_positions()
  • The tool function signature defines no required arguments and returns a list, documented to return options positions with chain symbol, type, strike price, expiration, and quantity.
    @mcp.tool()
    def robinhood_get_options_positions() -> list:
        """Get all current options positions (read-only).
    
        Returns list of options positions with chain symbol, type,
        strike price, expiration, and quantity.
        """
        _ensure_logged_in()
        return get_options_positions()
  • The `_safe_call` helper that wraps API calls with error handling, used by `get_options_positions()`.
    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
  • Imports: the handler imports `robin_stocks.robinhood as rh` and uses `rh.options.get_open_option_positions`.
    """Read-only Robinhood tools wrapping robin_stocks library."""
    
    import threading
    import time
    from collections.abc import Callable
    from copy import deepcopy
    from typing import Any, Literal
    
    import robin_stocks.robinhood as rh
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It declares read-only and lists return fields. However, it does not mention limits, pagination, or prerequisites.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with clear structure: action then return details. No unnecessary words.

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?

With 0 parameters and output schema existing, description covers core purpose and return fields. Could mention scope (all under account) or if expired included, but not critical.

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?

Input schema has 0 parameters, baseline is 4. Description does not add parameter info because none exist.

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?

The description clearly states the tool gets all current options positions, is read-only, and lists returned fields. It distinguishes from siblings like robinhood_get_positions (likely stock positions) and robinhood_get_portfolio.

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?

The description implies usage for options positions but does not explicitly compare with alternatives. Sibling names are clear, so context is adequate but lacks exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/drasticstatic/robinhood-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server