Skip to main content
Glama
MCP-100

Stock Market MCP Server

by MCP-100

get_financial_statement

Retrieve income statements, balance sheets, or cash flow statements for publicly traded companies using stock ticker symbols to analyze financial performance.

Instructions

Get financial statements for a company

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYesStock ticker symbol
statementYesType of financial statement

Implementation Reference

  • The core handler function that validates input, maps statement type to Alpha Vantage API function, fetches the financial statement data, and returns it as JSON text.
    private async handleGetFinancialStatement(args: { statement: 'income' | 'balance' | 'cashflow'; symbol: string }) {
      if (!args || typeof args !== 'object' ||
        !args.statement || !['income', 'balance', 'cashflow'].includes(args.statement)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid statement parameter');
      }
      if (!args.symbol || typeof args.symbol !== 'string') {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid symbol parameter');
      }
    
      const functionMap = {
        income: 'INCOME_STATEMENT',
        balance: 'BALANCE_SHEET',
        cashflow: 'CASH_FLOW'
      };
    
      const response = await this.axiosInstance.get('', {
        params: {
          function: functionMap[args.statement],
          symbol: args.symbol
        }
      });
    
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(response.data, null, 2)
        }]
      };
    }
  • src/index.ts:75-93 (registration)
    Registers the tool in the ListTools response, providing name, description, and input schema.
    {
      name: 'get_financial_statement',
      description: 'Get financial statements for a company',
      inputSchema: {
        type: 'object',
        properties: {
          symbol: {
            type: 'string',
            description: 'Stock ticker symbol'
          },
          statement: {
            type: 'string',
            enum: ['income', 'balance', 'cashflow'],
            description: 'Type of financial statement'
          }
        },
        required: ['symbol', 'statement']
      }
    },
  • Defines the input schema for validation: requires 'symbol' (string) and 'statement' (enum: 'income', 'balance', 'cashflow').
    inputSchema: {
      type: 'object',
      properties: {
        symbol: {
          type: 'string',
          description: 'Stock ticker symbol'
        },
        statement: {
          type: 'string',
          enum: ['income', 'balance', 'cashflow'],
          description: 'Type of financial statement'
        }
      },
      required: ['symbol', 'statement']
    }
  • Dispatcher case in CallToolRequestHandler that validates arguments and delegates to the specific handler.
    case 'get_financial_statement': {
      if (!request.params.arguments || typeof request.params.arguments !== 'object') {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid arguments');
      }
      const args = request.params.arguments as { statement: 'income' | 'balance' | 'cashflow'; symbol: string };
      return await this.handleGetFinancialStatement(args);
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool 'Get financial statements' but doesn't add any context about what this entails—e.g., whether it's a read-only operation, if it requires authentication, rate limits, or what the output format might be. This is a significant gap for a tool with no annotation coverage.

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 and directly states the tool's purpose, making it easy to parse and understand quickly.

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 complexity of financial data retrieval, the description is incomplete. With no annotations and no output schema, it fails to provide necessary context like response format, data scope, or error handling. This leaves gaps that could hinder an AI agent in using the tool effectively.

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%, meaning the input schema already fully documents the parameters (symbol and statement with enum). The description doesn't add any extra meaning or details beyond what the schema provides, such as examples or usage notes, so it meets the baseline score of 3.

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 with a specific verb ('Get') and resource ('financial statements for a company'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'get_company_overview' or 'get_market_report', which might also provide financial data, so it doesn't reach the highest score.

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 alternatives like the sibling tools. It doesn't mention any context, prerequisites, or exclusions, leaving the agent to infer usage based on the tool name alone.

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

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