Skip to main content
Glama
matteoantoci

Marketstack MCP Server

by matteoantoci

list_etf_tickers

Retrieve a list of supported ETF tickers with customizable pagination limits and offsets for precise API requests through the Marketstack MCP Server.

Instructions

List all supported ETF tickers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoSpecify a pagination limit (number of results per page) for your API request. Default limit value is `100`, maximum allowed limit value is `1000`.
listYesSpecify your list as ticker for your request.
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.

Implementation Reference

  • The main handler function that executes the tool logic by constructing API parameters and calling the Marketstack client to fetch ETF tickers.
    const listEtfTickersHandler = async (input: Input, client: MarketstackClient): Promise<Output> => {
      try {
        const { list, limit, offset } = input;
    
        const apiRequestParams: MarketstackApiParams = {
          endpoint: 'etflist',
          list,
          ...(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('listEtfTickers tool error:', error);
        const message = error instanceof Error ? error.message : 'An unknown error occurred.';
        throw new Error(`listEtfTickers tool failed: ${message}`);
      }
    };
  • Zod input schema shape defining parameters for the list_etf_tickers tool: list (fixed to 'ticker'), optional limit, and offset.
    const listEtfTickersInputSchemaShape = {
      list: z.literal('ticker').describe('Specify your list as ticker for your request.'),
      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.'
        ),
    };
  • Registration of the list_etf_tickers tool on the MCP server using server.tool, wrapping the handler with the Marketstack client.
    server.tool(
      listEtfTickersTool.name,
      listEtfTickersTool.description,
      listEtfTickersTool.inputSchemaShape,
      wrapToolHandler((input) => listEtfTickersTool.handler(input, client))
    );
  • Tool definition export that bundles name, description, schema, and handler for the list_etf_tickers tool.
    export const listEtfTickersTool: MarketstackToolDefinition = {
      name: 'list_etf_tickers',
      description: 'List all supported ETF tickers.',
      inputSchemaShape: listEtfTickersInputSchemaShape,
      handler: listEtfTickersHandler,
    };
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 'List all supported ETF tickers' but doesn't mention pagination (implied by the schema's limit/offset parameters), rate limits, authentication needs, or what the output format looks like. For a list operation with 3 parameters, this leaves significant behavioral aspects unexplained.

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 zero wasted words. It's front-loaded with the core purpose, making it easy to scan and understand quickly. Every word earns its place by directly stating what the tool does.

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 no annotations and no output schema, the description is incomplete for a tool with 3 parameters. It doesn't explain the pagination behavior (implied by limit/offset), what 'supported' means, or what the return data looks like. For a list operation that likely returns structured data, more context is needed to use it 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?

Schema description coverage is 100%, so the schema fully documents the parameters (limit, list, offset). The description adds no additional meaning beyond what's in the schema—it doesn't explain why 'list' is required or how parameters interact. Baseline 3 is appropriate when the schema does all the parameter documentation work.

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 ('List') and resource ('all supported ETF tickers'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'list_tickers' or 'list_exchange_tickers' that might also list tickers, so it's not fully specific about what makes this ETF ticker listing unique.

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. With siblings like 'list_tickers' and 'get_ticker_details', it's unclear if this is the preferred way to get ETF tickers or if there are specific contexts where other tools should be used instead. No exclusions or prerequisites are mentioned.

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