Skip to main content
Glama
MCP-100

Stock Market MCP Server

by MCP-100

get_company_overview

Retrieve company overview and key financial metrics by entering a stock ticker symbol to analyze investment opportunities.

Instructions

Get company overview and key metrics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesStock ticker symbol

Implementation Reference

  • The handler function that executes the tool logic: fetches company overview data from Alpha Vantage API using the 'OVERVIEW' endpoint and returns the JSON response.
    private async handleGetCompanyOverview(args: { symbol: string }) {
      const response = await this.axiosInstance.get('', {
        params: {
          function: 'OVERVIEW',
          symbol: args.symbol
        }
      });
    
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(response.data, null, 2)
        }]
      };
    }
  • Input schema definition for the get_company_overview tool, specifying the required 'symbol' parameter.
    inputSchema: {
      type: 'object',
      properties: {
        symbol: {
          type: 'string',
          description: 'Stock ticker symbol'
        }
      },
      required: ['symbol']
    }
  • src/index.ts:94-107 (registration)
    Tool registration in the ListTools response, including name, description, and schema.
    {
      name: 'get_company_overview',
      description: 'Get company overview and key metrics',
      inputSchema: {
        type: 'object',
        properties: {
          symbol: {
            type: 'string',
            description: 'Stock ticker symbol'
          }
        },
        required: ['symbol']
      }
    }
  • src/index.ts:125-131 (registration)
    Dispatch/registration logic in CallToolRequest handler that validates input and calls the tool handler.
    case 'get_company_overview': {
      if (!request.params.arguments || typeof request.params.arguments !== 'object') {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid arguments');
      }
      const args = request.params.arguments as { symbol: string };
      return await this.handleGetCompanyOverview(args);
    }

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/MCP-100/stock-market-server'

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