Skip to main content
Glama
jackdark425

Financial Modeling Prep (FMP) MCP Server

by jackdark425

get_economic_indicator

Retrieve economic indicator data like GDP, unemployment, and inflation for financial analysis and market tracking using date ranges.

Instructions

Get economic indicator data (GDP, unemployment, inflation, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesIndicator name (e.g., GDP, unemploymentRate, CPI)
fromNoStart date in YYYY-MM-DD format (optional)
toNoEnd date in YYYY-MM-DD format (optional)

Implementation Reference

  • The handler function for 'get_economic_indicator' that fetches economic indicator data from the FMP API.
      async (args: z.infer<typeof EconomicIndicatorSchema>) => {
        try {
          let endpoint = `/economic-indicators?name=${args.name}`;
          if (args.from) endpoint += `&from=${args.from}`;
          if (args.to) endpoint += `&to=${args.to}`;
          const data = await fetchFMP(endpoint);
          return jsonResponse(data);
        } catch (error) {
          return errorResponse(error);
        }
      }
    );
  • Registration of the 'get_economic_indicator' tool with the server.
    server.registerTool(
      'get_economic_indicator',
      {
        description: 'Get economic indicator data (GDP, unemployment, inflation, etc.)',
        inputSchema: EconomicIndicatorSchema,
      },
      async (args: z.infer<typeof EconomicIndicatorSchema>) => {
        try {
          let endpoint = `/economic-indicators?name=${args.name}`;
          if (args.from) endpoint += `&from=${args.from}`;
          if (args.to) endpoint += `&to=${args.to}`;
          const data = await fetchFMP(endpoint);
          return jsonResponse(data);
        } catch (error) {
          return errorResponse(error);
        }
      }
    );
  • Input schema definition for the 'get_economic_indicator' tool.
    const EconomicIndicatorSchema = z.object({
      name: z.string().describe('Indicator name (e.g., GDP, unemploymentRate, CPI)'),
      from: z.string().optional().describe('Start date in YYYY-MM-DD format (optional)'),
      to: z.string().optional().describe('End date in YYYY-MM-DD format (optional)'),
    });
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 mentions data retrieval but lacks critical behavioral details: required permissions, rate limits, data freshness, format of returned data, or error handling. 'Get' suggests read-only, but this isn't explicitly confirmed.

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?

Single sentence with zero waste—front-loaded with the core action and resource, followed by clarifying examples. Every word earns its place without redundancy.

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?

For a 3-parameter tool with no annotations and no output schema, the description is insufficient. It doesn't explain what data is returned (e.g., time series, single value), handling of optional dates, or error cases. The context signals indicate complexity that isn't addressed.

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 parameters (name, from, to). The description adds no additional parameter semantics beyond implying the tool handles economic indicators, which is already clear from the tool name and schema examples.

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 resource ('economic indicator data'), with examples (GDP, unemployment, inflation) that help specify the scope. It distinguishes from most siblings that focus on company/symbol data, though not explicitly from get_economic_calendar.

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 on when to use this tool versus alternatives like get_economic_calendar or get_technical_indicator_*. The description implies it's for historical data retrieval but doesn't specify contexts, prerequisites, or exclusions.

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

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/jackdark425/aigroup-fmp-mcp'

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