Skip to main content
Glama
matteoantoci

Marketstack MCP Server

by matteoantoci

list_tickers

Retrieve a full list of supported stock tickers by searching name, symbol, or exchange mic, with options to paginate results for efficient data access.

Instructions

Get the full list of supported tickers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exchangeNoUse this parameter to search stock tickers by the exchange mic.
limitNoSpecify a pagination limit (number of results per page) for your API request. Default limit value is `100`, maximum allowed limit value is `1000`.
offsetNoSpecify a pagination offset value for your API request. Example: An offset value of `100` combined with a limit value of 10 would show results 100-110. Default value is `0`, starting with the first available result.
searchNoUse this parameter to search stock tickers by name or ticker symbol.

Implementation Reference

  • Implementation of the list_tickers tool handler function, which constructs API parameters and fetches ticker list data from the Marketstack API.
    const listTickersHandler = async (input: Input, client: MarketstackClient): Promise<Output> => {
      try {
        const { search, exchange, limit, offset } = input;
    
        const apiRequestParams: MarketstackApiParams = {
          endpoint: 'tickerslist',
          ...(search && { search }), // Include if search is provided
          ...(exchange && { exchange }), // Include if exchange is provided
          ...(limit && { limit }), // Include if limit is provided
          ...(offset && { offset }), // Include if offset is provided
        };
    
        const data = await client.fetchApiData(apiRequestParams);
    
        return data;
      } catch (error: unknown) {
        console.error('listTickers tool error:', error);
        const message = error instanceof Error ? error.message : 'An unknown error occurred.';
        throw new Error(`listTickers tool failed: ${message}`);
      }
    };
  • Zod input schema shape defining optional parameters for the list_tickers tool: search, exchange, limit, and offset.
    const listTickersInputSchemaShape = {
      search: z.string().optional().describe('Use this parameter to search stock tickers by name or ticker symbol.'),
      exchange: z.string().optional().describe('Use this parameter to search stock tickers by the exchange mic.'),
      limit: z
        .number()
        .int()
        .min(1)
        .max(1000)
        .optional()
        .default(100)
        .describe(
          'Specify a pagination limit (number of results per page) for your API request. Default limit value is `100`, maximum allowed limit value is `1000`.'
        ),
      offset: z
        .number()
        .int()
        .min(0)
        .optional()
        .default(0)
        .describe(
          'Specify a pagination offset value for your API request. Example: An offset value of `100` combined with a limit value of 10 would show results 100-110. Default value is `0`, starting with the first available result.'
        ),
    };
  • Tool definition object that exports the list_tickers tool configuration including name, description, input schema, and handler reference.
    export const listTickersTool: MarketstackToolDefinition = {
      name: 'list_tickers',
      description: 'Get the full list of supported tickers.',
      inputSchemaShape: listTickersInputSchemaShape,
      handler: listTickersHandler,
    };
  • MCP server registration of the list_tickers tool using server.tool() with wrapped handler.
    server.tool(
      listTickersTool.name,
      listTickersTool.description,
      listTickersTool.inputSchemaShape,
      wrapToolHandler((input) => listTickersTool.handler(input, client))
    );
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 'full list' but doesn't clarify if this is a read-only operation, whether it requires authentication, or if there are rate limits. The description lacks details on output format, pagination behavior (implied by parameters but not described), or potential side effects, leaving significant gaps in behavioral understanding.

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: 'Get the full list of supported tickers.' It is front-loaded with the core purpose, has zero wasted words, and is appropriately sized for a simple list tool. Every part of the sentence earns its place by clearly stating the tool's function.

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 tool's complexity (4 parameters, no output schema, no annotations), the description is insufficiently complete. It doesn't explain the return values, pagination behavior, or any constraints like authentication needs. For a tool with multiple parameters and no structured output information, the description should provide more context to guide effective 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?

Schema description coverage is 100%, so the schema fully documents all four parameters (exchange, limit, offset, search). The description adds no additional parameter semantics beyond what's in the schema, such as examples or usage context. This meets the baseline score of 3, as the schema handles the heavy lifting without description enhancement.

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: 'Get the full list of supported tickers.' It specifies the verb ('Get') and resource ('full list of supported tickers'), making the intent unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'list_etf_tickers' or 'list_exchange_tickers', which reduces clarity in distinguishing between similar list operations.

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. It doesn't mention sibling tools like 'list_etf_tickers' or 'list_exchange_tickers', nor does it specify contexts or exclusions for usage. This lack of comparative information leaves the agent without clear direction on tool selection.

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