Skip to main content
Glama
drasticstatic

robinhood-mcp

robinhood_get_ratings

Retrieve analyst ratings summary for any stock ticker to assess market sentiment and make informed investment decisions.

Instructions

Get analyst ratings summary for a stock.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesStock ticker symbol

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler exposed as 'robinhood_get_ratings'. Decorated with @mcp.tool(), it calls _ensure_logged_in() then delegates to get_ratings(symbol).
    @mcp.tool()
    def robinhood_get_ratings(symbol: str) -> dict:
        """Get analyst ratings summary for a stock.
    
        Args:
            symbol: Stock ticker symbol
    
        Returns ratings summary with buy, hold, sell counts,
        and overall recommendation.
        """
        _ensure_logged_in()
        return get_ratings(symbol)
  • The actual business-logic implementation of get_ratings(). Normalizes the symbol, calls robin_stocks' rh.stocks.get_ratings, validates the result is a dict, and returns it or raises RobinhoodError.
    def get_ratings(symbol: str) -> dict[str, Any]:
        """Get analyst ratings summary for a stock.
    
        Args:
            symbol: Stock ticker symbol.
    
        Returns:
            Ratings summary with buy, hold, sell counts and summary.
        """
        symbol = _normalize_symbol(symbol)
        result = _safe_call(rh.stocks.get_ratings, symbol)
    
        if isinstance(result, dict):
            return result
        raise RobinhoodError(f"No ratings found for symbol: {symbol}")
  • Import registration — get_ratings is imported from .tools module so it can be used by the MCP handler in server.py.
        get_ratings,
        get_watchlist,
        search_symbols,
    )
  • _safe_call helper used by get_ratings to invoke the underlying robin_stocks API call 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
  • _normalize_symbol helper used by get_ratings to uppercase and validate the ticker symbol.
    def _normalize_symbol(symbol: str) -> str:
        """Normalize and validate ticker symbols."""
        if not symbol or not isinstance(symbol, str):
            raise RobinhoodError("Symbol must be a non-empty string")
        symbol = symbol.upper().strip()
        if not symbol:
            raise RobinhoodError("Symbol must be a non-empty string")
        return symbol
Behavior2/5

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

No annotations are provided, so the description must bear the full burden of behavioral disclosure. It merely states it gets a summary, but does not describe what the summary includes (e.g., rating counts, target price), data freshness, or any side effects.

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?

The description is a single, front-loaded sentence with no wasted words, making it efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with one parameter and an output schema exists, so the description doesn't need to detail return values. However, it lacks some behavioral context that would be helpful, such as whether the summary is for the current day or a historical period.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for the single parameter 'symbol', which is adequately described as 'Stock ticker symbol'. The description adds no further meaning, so baseline score of 3 is appropriate.

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 verb 'Get', the resource 'analyst ratings summary', and the scope 'for a stock', effectively distinguishing it from sibling tools like robinhood_get_dividends or robinhood_get_earnings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description offers no guidance on when to use this tool versus alternatives, nor any exclusions or prerequisites. For example, it doesn't specify if this is for a single symbol or if it provides consensus ratings.

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