Skip to main content
Glama
matteoantoci

Marketstack MCP Server

by matteoantoci

list_bonds_countries

Retrieve a list of supported countries for bond data with pagination options. Access financial market information via the Marketstack MCP Server.

Instructions

List all supported countries for bond data.

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`.
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 handler function that implements the core logic of the 'list_bonds_countries' tool, making an API call to the Marketstack 'bonds' endpoint with pagination parameters.
    const listBondsCountriesHandler = async (input: Input, client: MarketstackClient): Promise<Output> => {
      try {
        const { limit, offset } = input;
    
        // Assuming the endpoint for listing bond countries is 'bonds' or 'bondslist'
        // The documentation is slightly ambiguous, using 'bond' for details
        // and showing a listing response structure without a clear endpoint path.
        // We'll try 'bonds' first based on the 'bond' example.
        const endpoint = 'bonds';
    
        const apiRequestParams: MarketstackApiParams = {
          endpoint,
          ...(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('listBondsCountries tool error:', error);
        const message = error instanceof Error ? error.message : 'An unknown error occurred.';
        throw new Error(`listBondsCountries tool failed: ${message}`);
      }
    };
  • Zod input schema definition for the 'list_bonds_countries' tool, defining optional limit and offset parameters with validation and descriptions.
    const listBondsCountriesInputSchemaShape = {
      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_bonds_countries' tool on the MCP server using server.tool() with wrapped handler.
    server.tool(
      listBondsCountriesTool.name,
      listBondsCountriesTool.description,
      listBondsCountriesTool.inputSchemaShape,
      wrapToolHandler((input) => listBondsCountriesTool.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 full burden. It states it 'List all supported countries' but doesn't disclose behavioral traits like pagination (implied by parameters but not described), rate limits, authentication needs, or what 'supported' means (e.g., active vs. historical). The description is minimal and lacks operational context.

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 that directly states the tool's purpose with zero wasted words. It's appropriately sized for a simple listing tool and front-loads the core functionality without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (listing operation with well-documented parameters) and no output schema, the description is minimally adequate but lacks completeness. It doesn't explain the return format (e.g., list of strings/objects), error conditions, or how results are ordered. With no annotations, more behavioral context would improve completeness.

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%, providing detailed documentation for both limit and offset parameters. The description adds no parameter-specific information beyond what's in the schema, so it meets the baseline of 3. It doesn't compensate for any gaps since there are none in the schema.

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 the resource 'supported countries for bond data', making the purpose immediately understandable. It distinguishes from most siblings that focus on specific data retrieval (e.g., get_bond_info) rather than listing options. However, it doesn't explicitly differentiate from other list_* tools like list_currencies or list_exchanges, which follow a similar pattern.

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 prerequisites, use cases, or how it relates to other bond-related tools like get_bond_info. For example, it doesn't clarify if this should be called first to validate country codes before fetching bond data.

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