Skip to main content
Glama
jjmerri

E*TRADE MCP Server

by jjmerri

etrade_authenticate

Complete E*TRADE OAuth authentication using the verification code received after authorizing the application to access market data and trading functionality.

Instructions

Complete E*TRADE OAuth authentication with verification code.

Args: verifier: The verification code received after authorizing the application

Returns: Success message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
verifierYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'etrade_authenticate' tool. It is registered via the @mcp.tool() decorator. The function signature and docstring define the input schema (verifier: str). It completes the OAuth flow using the previously obtained request token and verifier, creates a MarketClient session, and returns a success message.
    @mcp.tool()
    def etrade_authenticate(verifier: str) -> str:
        """
        Complete E*TRADE OAuth authentication with verification code.
        
        Args:
            verifier: The verification code received after authorizing the application
            
        Returns:
            Success message
        """
        global _market_client, _request_token, _request_token_secret
        
        if not _request_token or not _request_token_secret:
            raise ValueError(
                "No request token found. Please call etrade_get_auth_url first."
            )
        
        auth = get_auth()
        session = auth.get_session(_request_token, _request_token_secret, verifier)
        _market_client = MarketClient(session, auth.base_url)
        
        return f"Successfully authenticated! Using {auth.environment} environment at {auth.base_url}"
Behavior2/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 of behavioral disclosure. It mentions the tool completes OAuth authentication, implying it's a write/mutation operation that likely stores tokens or establishes a session. However, it doesn't disclose critical behavioral traits such as whether this is a one-time setup, if it requires prior steps (like calling 'etrade_get_auth_url'), error handling, or rate limits. For a tool with no annotations and significant behavioral implications, this is inadequate.

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

Conciseness4/5

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

The description is appropriately sized and front-loaded: the first sentence states the purpose clearly, followed by structured 'Args' and 'Returns' sections. There's no wasted text, and the structure aids readability. It could be slightly more concise by integrating the 'Args' explanation into the main description, but it's efficient overall.

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?

Given the tool's complexity (OAuth authentication with no annotations and an output schema), the description is minimally complete. It explains the parameter and return value ('Success message'), and the output schema likely provides more detail on returns. However, it lacks context on prerequisites (e.g., dependency on 'etrade_get_auth_url'), error cases, or behavioral nuances, leaving gaps for an AI agent to infer usage correctly.

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?

The schema description coverage is 0%, but the description includes an 'Args' section that explains 'verifier' as 'The verification code received after authorizing the application.' This adds meaningful semantics beyond the bare schema, clarifying the parameter's purpose and source. However, it doesn't provide format details (e.g., length, character set) or examples. With 0% schema coverage, the description compensates partially but not fully.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Complete E*TRADE OAuth authentication with verification code.' It specifies the verb ('Complete authentication') and resource ('E*TRADE OAuth'), though it doesn't explicitly differentiate from sibling tools like 'etrade_get_auth_url' which likely provides the initial authorization URL. The purpose is clear but lacks sibling distinction.

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

Usage Guidelines3/5

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

The description implies usage context by mentioning 'verification code received after authorizing the application,' suggesting this tool is used after obtaining an auth URL (likely from 'etrade_get_auth_url'). However, it doesn't explicitly state when to use this tool versus alternatives or provide exclusions. The guidance is implied but not explicit.

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/jjmerri/etrade-mcp'

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