Skip to main content
Glama
matteoantoci

Marketstack MCP Server

by matteoantoci

get_bond_info

Retrieve real-time government bond data for any specified country using the Marketstack MCP Server. Simplify financial analysis with accurate bond information.

Instructions

Get real-time government bond data for a specific country.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countryYesSpecify your country for your request, e.g. kenya or united%20states

Implementation Reference

  • The async handler function that implements the core logic of the 'get_bond_info' tool, fetching government bond data for a specified country using the MarketstackClient API.
    const getBondInfoHandler = async (input: Input, client: MarketstackClient): Promise<Output> => {
      try {
        const { country } = input;
    
        const apiRequestParams: MarketstackApiParams = {
          endpoint: 'bond',
          country,
        };
    
        const data = await client.fetchApiData(apiRequestParams);
    
        return data;
      } catch (error: unknown) {
        console.error('getBondInfo tool error:', error);
        const message = error instanceof Error ? error.message : 'An unknown error occurred.';
        throw new Error(`getBondInfo tool failed: ${message}`);
      }
    };
  • The Zod input schema shape for the 'get_bond_info' tool, defining the required 'country' parameter.
    const getBondInfoInputSchemaShape = {
      country: z.string().describe('Specify your country for your request, e.g. kenya or united%20states'),
    };
  • The registration of the 'get_bond_info' tool on the MCP server using server.tool(), wrapping the handler with wrapToolHandler.
    server.tool(
      getBondInfoTool.name,
      getBondInfoTool.description,
      getBondInfoTool.inputSchemaShape,
      wrapToolHandler((input) => getBondInfoTool.handler(input, client))
    );
  • The tool definition object exporting the name, description, schema, and handler for 'get_bond_info', used in registration.
    export const getBondInfoTool: MarketstackToolDefinition = {
      name: 'get_bond_info',
      description: 'Get real-time government bond data for a specific country.',
      inputSchemaShape: getBondInfoInputSchemaShape,
      handler: getBondInfoHandler,
    };
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 'real-time' data, which hints at timeliness, but does not cover critical aspects like rate limits, authentication needs, error handling, or what the return format looks like (e.g., JSON structure, data fields). This is a significant gap for a data retrieval tool with zero 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 that front-loads the core purpose without any wasted words. It is appropriately sized for a simple tool with one parameter, making it easy to parse quickly.

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 (one parameter, no output schema, no annotations), the description is minimally adequate. It states what data is fetched but lacks details on behavioral traits, output format, or usage context. With no output schema, it should ideally hint at return values, but the simplicity keeps it from being severely incomplete.

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%, with the single parameter 'country' well-documented in the schema. The description adds no additional meaning beyond the schema, such as country code formats or data availability per country. Baseline score of 3 is appropriate since the schema handles parameter documentation adequately.

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 'Get' and the resource 'real-time government bond data for a specific country', making the purpose unambiguous. However, it does not explicitly differentiate from sibling tools like 'list_bonds_countries' or 'get_ticker_details', which might also involve bond-related data, so it falls short of a perfect 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, such as 'list_bonds_countries' for listing countries or other data-fetching tools. It lacks explicit when/when-not instructions or named alternatives, leaving usage context implied at best.

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