Skip to main content
Glama
matteoantoci

Marketstack MCP Server

by matteoantoci

get_ticker_info

Fetch detailed information about financial market tickers using Marketstack API. Retrieve data including EOD, intraday, splits, dividends, and exchanges for informed decision-making.

Instructions

Look up information about tickers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tickerYesTo get results based on a ticker.

Implementation Reference

  • The handler function that executes the get_ticker_info tool logic, fetching ticker information from the Marketstack API using the provided ticker symbol.
    const getTickerInfoHandler = async (input: Input, client: MarketstackClient): Promise<Output> => {
      try {
        const { ticker } = input;
    
        const apiRequestParams: MarketstackApiParams = {
          endpoint: 'tickerinfo',
          ticker,
        };
    
        const data = await client.fetchApiData(apiRequestParams);
    
        return data;
      } catch (error: unknown) {
        console.error('getTickerInfo tool error:', error);
        const message = error instanceof Error ? error.message : 'An unknown error occurred.';
        throw new Error(`getTickerInfo tool failed: ${message}`);
      }
    };
  • Zod schema and TypeScript types for the input (ticker symbol) of the get_ticker_info tool.
    // Define the input schema shape for the Ticker Info tool
    const getTickerInfoInputSchemaShape = {
      ticker: z.string().describe('To get results based on a ticker.'),
    };
    
    type RawSchemaShape = typeof getTickerInfoInputSchemaShape;
    type Input = z.infer<z.ZodObject<RawSchemaShape>>;
    type Output = any; // TODO: Define a more specific output type based on Marketstack response
  • Registration of the get_ticker_info tool with the MCP server using server.tool, wrapping the handler with the Marketstack client.
    server.tool(
      getTickerInfoTool.name,
      getTickerInfoTool.description,
      getTickerInfoTool.inputSchemaShape,
      wrapToolHandler((input) => getTickerInfoTool.handler(input, client))
    );
  • Tool definition object that bundles the name, description, schema, and handler for get_ticker_info.
    export const getTickerInfoTool: MarketstackToolDefinition = {
      name: 'get_ticker_info',
      description: 'Look up information about tickers.',
      inputSchemaShape: getTickerInfoInputSchemaShape,
      handler: getTickerInfoHandler,
    };
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 it 'looks up' information, implying a read-only operation, but doesn't specify whether it requires authentication, has rate limits, returns real-time or historical data, or what format the output takes. This leaves significant gaps 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.

Conciseness4/5

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

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. However, it could be more front-loaded with specific details to improve clarity, but it avoids redundancy and waste.

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 tools and the lack of annotations and output schema, the description is insufficient. It doesn't explain what type of information is returned (e.g., basic vs. detailed data), how it differs from siblings, or any behavioral constraints, making it incomplete for effective agent use.

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 single parameter 'ticker' documented as 'To get results based on a ticker.' The description adds no additional meaning beyond this, such as examples of valid tickers or formatting requirements. With high schema coverage, the baseline score of 3 is appropriate.

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

Purpose3/5

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

The description 'Look up information about tickers' states a clear verb ('look up') and resource ('tickers'), but it's vague about what specific information is retrieved. It distinguishes from siblings like 'get_ticker_details' only by being more generic, not by clearly articulating a different scope or type of data.

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?

No guidance is provided on when to use this tool versus alternatives. With siblings like 'get_ticker_details', 'get_end_of_day_data', and 'get_intraday_data', the description offers no indication of what makes this tool distinct or when it should be preferred over other ticker-related 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

Related 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/matteoantoci/mcp-marketstack'

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