Skip to main content
Glama

Query Economic Indicators

query_indicators

Retrieve current values for economic indicators such as CPI, GDP, and unemployment rates. Filter by series ID, category, or frequency to access data from FRED, BLS, and BEA.

Instructions

Get current values for economic indicators like CPI, GDP, unemployment, interest rates, and more. Filter by series ID, category, or frequency. Cost: $0.01 per query. Source: FRED, BLS, BEA.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seriesNoFRED series ID (e.g. CPIAUCSL, GDP, UNRATE)
categoryNoCategory filter (e.g. inflation, employment, gdp)
frequencyNoData frequency filter
limitNoMaximum results (default 25)

Implementation Reference

  • The handler function for query_indicators. It calls the Verilex API at /api/v1/econ/indicators with query params (series, category, frequency, limit), handles errors, and returns indicator data as text content.
      async ({ series, category, frequency, limit }) => {
        const res = await apiGet<EconQueryResponse>("/api/v1/econ/indicators", {
          series,
          category,
          frequency,
          limit: limit ?? 25,
        });
    
        if (!res.ok) {
          return {
            content: [
              {
                type: "text" as const,
                text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
              },
            ],
            isError: true,
          };
        }
    
        const { count, data } = res.data;
        const warn = stalenessWarning(res);
        const summary = `${warn}Found ${count} indicator(s).`;
        const json = JSON.stringify(data, null, 2);
    
        return {
          content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
        };
      },
    );
  • Input schema for query_indicators using Zod. Defines optional parameters: series (string), category (string), frequency (enum: daily/weekly/monthly/quarterly/annual), limit (number 1-100, default 25).
    inputSchema: {
      series: z
        .string()
        .optional()
        .describe("FRED series ID (e.g. CPIAUCSL, GDP, UNRATE)"),
      category: z
        .string()
        .optional()
        .describe("Category filter (e.g. inflation, employment, gdp)"),
      frequency: z
        .enum(["daily", "weekly", "monthly", "quarterly", "annual"])
        .optional()
        .describe("Data frequency filter"),
      limit: z
        .number()
        .int()
        .min(1)
        .max(100)
        .optional()
        .describe("Maximum results (default 25)"),
    },
  • Registration of query_indicators tool via server.registerTool() with the name 'query_indicators', along with its title, description, input schema, and handler.
    server.registerTool(
      "query_indicators",
      {
        title: "Query Economic Indicators",
        description:
          "Get current values for economic indicators like CPI, GDP, unemployment, " +
          "interest rates, and more. Filter by series ID, category, or frequency. " +
          "Cost: $0.01 per query. Source: FRED, BLS, BEA.",
        inputSchema: {
          series: z
            .string()
            .optional()
            .describe("FRED series ID (e.g. CPIAUCSL, GDP, UNRATE)"),
          category: z
            .string()
            .optional()
            .describe("Category filter (e.g. inflation, employment, gdp)"),
          frequency: z
            .enum(["daily", "weekly", "monthly", "quarterly", "annual"])
            .optional()
            .describe("Data frequency filter"),
          limit: z
            .number()
            .int()
            .min(1)
            .max(100)
            .optional()
            .describe("Maximum results (default 25)"),
        },
      },
      async ({ series, category, frequency, limit }) => {
        const res = await apiGet<EconQueryResponse>("/api/v1/econ/indicators", {
          series,
          category,
          frequency,
          limit: limit ?? 25,
        });
    
        if (!res.ok) {
          return {
            content: [
              {
                type: "text" as const,
                text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
              },
            ],
            isError: true,
          };
        }
    
        const { count, data } = res.data;
        const warn = stalenessWarning(res);
        const summary = `${warn}Found ${count} indicator(s).`;
        const json = JSON.stringify(data, null, 2);
    
        return {
          content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
        };
      },
    );
  • src/index.ts:57-57 (registration)
    The call to registerEconTools(server) which registers query_indicators (among other econ tools) on the MCP server.
    registerEconTools(server);
  • The stalenessWarning helper used in the query_indicators handler to check for stale data headers from the API response.
    export function stalenessWarning(res: ApiResponse): string {
      if (!res.stale) return "";
      const parts = ["[STALE DATA]"];
      if (res.lastUpdated) parts.push(`Last updated: ${res.lastUpdated}`);
      if (res.ageSeconds != null) parts.push(`Age: ${res.ageSeconds}s`);
      return parts.join(" ") + "\n\n";
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears the full burden of behavioral disclosure. It indicates a read operation ('Get current values') and notes a cost, but does not mention rate limits, authentication requirements, or any side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loading the purpose and listing examples. It is concise and well-structured, though the inclusion of cost and sources adds value without unnecessary verbosity.

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?

The description names data sources (FRED, BLS, BEA) and cost, which provides useful context. However, lack of output schema and details about the response format leaves the agent uncertain about return values. For a query tool, this is a minor gap.

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?

Input schema coverage is 100%, so the baseline is 3. The description adds context that series uses FRED series IDs and that category, frequency, and limit are filters, but this largely echoes the schema descriptions. It does not significantly enhance parameter understanding.

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 retrieves current values for economic indicators, listing examples like CPI, GDP, and unemployment. It is specific and distinguishes the tool from generic 'get' tools, though it does not explicitly differentiate from similar economic tools like econ_stats.

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 mentions a cost of $0.01 per query, which is a usage guideline, but it does not specify when to use this tool versus alternatives, nor does it provide any exclusions or prerequisites.

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/carrierone/verilexdata-mcp'

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