Skip to main content
Glama
berlinbra

AlphaVantage-MCP

get-company-info

Retrieve detailed company information using stock symbols to access financial data and company profiles for investment research and analysis.

Instructions

Get detailed company information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesStock symbol (e.g., AAPL, MSFT)

Implementation Reference

  • The handler logic for executing the 'get-company-info' tool. Validates input, fetches company overview data from Alpha Vantage API using 'OVERVIEW' function, formats the response, and returns structured text content.
    elif name == "get-company-info":
        symbol = arguments.get("symbol")
        if not symbol:
            return [types.TextContent(type="text", text="Missing symbol parameter")]
    
        symbol = symbol.upper()
    
        async with httpx.AsyncClient() as client:
            company_data = await make_alpha_request(
                client,
                "OVERVIEW",
                symbol
            )
    
            if isinstance(company_data, str):
                return [types.TextContent(type="text", text=f"Error: {company_data}")]
    
            formatted_info = format_company_info(company_data)
            info_text = f"Company information for {symbol}:\n\n{formatted_info}"
    
            return [types.TextContent(type="text", text=info_text)]
  • Registration of the 'get-company-info' tool in the list_tools handler, including name, description, and JSON schema for input validation (requires 'symbol' string).
    types.Tool(
        name="get-company-info",
        description="Get detailed company information",
        inputSchema={
            "type": "object",
            "properties": {
                "symbol": {
                    "type": "string",
                    "description": "Stock symbol (e.g., AAPL, MSFT)",
                },
            },
            "required": ["symbol"],
        },
    ),
  • Input schema definition for the 'get-company-info' tool as part of its registration.
    types.Tool(
        name="get-company-info",
        description="Get detailed company information",
        inputSchema={
            "type": "object",
            "properties": {
                "symbol": {
                    "type": "string",
                    "description": "Stock symbol (e.g., AAPL, MSFT)",
                },
            },
            "required": ["symbol"],
        },
    ),
  • Helper function specifically for formatting company overview data into a human-readable string, extracting key fields like name, sector, industry, market cap, description, exchange, and currency.
    def format_company_info(overview_data: Dict[str, Any]) -> str:
        """Format company information into a concise string.
        
        Args:
            overview_data: The response data from the Alpha Vantage OVERVIEW endpoint
            
        Returns:
            A formatted string containing the company information
        """
        try:
            if not overview_data:
                return "No company information available in the response"
    
            return (
                f"Name: {overview_data.get('Name', 'N/A')}\n"
                f"Sector: {overview_data.get('Sector', 'N/A')}\n"
                f"Industry: {overview_data.get('Industry', 'N/A')}\n"
                f"Market Cap: ${overview_data.get('MarketCapitalization', 'N/A')}\n"
                f"Description: {overview_data.get('Description', 'N/A')}\n"
                f"Exchange: {overview_data.get('Exchange', 'N/A')}\n"
                f"Currency: {overview_data.get('Currency', 'N/A')}\n"
                "---"
            )
        except Exception as e:
            return f"Error formatting company data: {str(e)}"
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 states the action ('Get') but doesn't reveal if this is a read-only operation, requires authentication, has rate limits, or what the output format might be. For a tool with no annotations, this leaves critical behavioral traits unspecified, though it doesn't contradict any annotations.

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, efficient sentence with no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word contributes directly to stating the tool's purpose, earning its place without unnecessary elaboration.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete for a tool that likely returns complex data. It doesn't specify what 'detailed company information' entails (e.g., financials, profile, metrics), leaving the agent uncertain about the response format. With no structured fields to compensate, the description should do more to clarify the output and behavioral context.

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 100%, with the parameter 'symbol' fully documented in the schema as 'Stock symbol (e.g., AAPL, MSFT)'. The description doesn't add any extra meaning beyond this, such as explaining what 'detailed company information' includes or how the symbol is used. Given the high schema coverage, a baseline score of 3 is appropriate as the schema handles the parameter documentation adequately.

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 verb ('Get') and resource ('detailed company information'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get-stock-quote' or 'get-etf-profile', which might also retrieve company-related data, leaving some ambiguity about what specific information this tool provides compared to alternatives.

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 provides no guidance on when to use this tool versus siblings. It doesn't mention alternatives like 'get-stock-quote' for price data or 'get-etf-profile' for ETF details, nor does it specify prerequisites such as needing a stock symbol. This lack of context makes it harder for an agent to choose correctly among similar tools.

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/berlinbra/alpha-vantage-mcp'

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