Skip to main content
Glama

Query Economic Releases

query_releases

Retrieve upcoming economic data releases with release dates, expected impact, prior values, and consensus forecasts from FRED, BLS, and BEA.

Instructions

Get upcoming economic data releases. Shows release dates, expected impact, prior values, and consensus forecasts. Cost: $0.01 per query. Source: FRED, BLS, BEA.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoNumber of days to look ahead (default 14)
categoryNoCategory filter (e.g. inflation, employment)
limitNoMaximum results (default 25)

Implementation Reference

  • The handler function for the 'query_releases' tool. It calls apiGet('/api/v1/econ/releases') with days, category, and limit parameters, processes the response, and returns formated text content with a summary and JSON data.
    async ({ days, category, limit }) => {
      const res = await apiGet<EconQueryResponse>("/api/v1/econ/releases", {
        days: days ?? 14,
        category,
        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} upcoming release(s).`;
      const json = JSON.stringify(data, null, 2);
    
      return {
        content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
      };
    },
  • The input schema for 'query_releases' tool, defining optional parameters: days (int 1-90), category (string), and limit (int 1-100).
    inputSchema: {
      days: z
        .number()
        .int()
        .min(1)
        .max(90)
        .optional()
        .describe("Number of days to look ahead (default 14)"),
      category: z
        .string()
        .optional()
        .describe("Category filter (e.g. inflation, employment)"),
      limit: z
        .number()
        .int()
        .min(1)
        .max(100)
        .optional()
        .describe("Maximum results (default 25)"),
    },
  • The registration call for the 'query_releases' tool via server.registerTool(), with its title, description, input schema, and handler.
    server.registerTool(
      "query_releases",
      {
        title: "Query Economic Releases",
        description:
          "Get upcoming economic data releases. Shows release dates, expected impact, " +
          "prior values, and consensus forecasts. " +
          "Cost: $0.01 per query. Source: FRED, BLS, BEA.",
        inputSchema: {
          days: z
            .number()
            .int()
            .min(1)
            .max(90)
            .optional()
            .describe("Number of days to look ahead (default 14)"),
          category: z
            .string()
            .optional()
            .describe("Category filter (e.g. inflation, employment)"),
          limit: z
            .number()
            .int()
            .min(1)
            .max(100)
            .optional()
            .describe("Maximum results (default 25)"),
        },
      },
      async ({ days, category, limit }) => {
        const res = await apiGet<EconQueryResponse>("/api/v1/econ/releases", {
          days: days ?? 14,
          category,
          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} upcoming release(s).`;
        const json = JSON.stringify(data, null, 2);
    
        return {
          content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
        };
      },
    );
  • The apiGet helper function used by the handler to make HTTP GET requests to the Verilex API.
    export async function apiGet<T = unknown>(
      path: string,
      params?: Record<string, string | number | undefined>,
    ): Promise<ApiResponse<T>> {
      const url = buildUrl(path, params);
    
      const headers: Record<string, string> = {
        Accept: "application/json",
        "User-Agent": "verilex-mcp-server/0.1.0",
      };
    
      // Forward x402 payment token if present in env (for paid endpoints)
      const paymentToken = process.env.VERILEX_PAYMENT_TOKEN;
      if (paymentToken) {
        headers["X-Payment-Token"] = paymentToken;
      }
    
      const res = await fetch(url, { headers });
      const data = (await res.json()) as T;
    
      const stale = res.headers.get("X-Data-Stale");
      const lastUpdated = res.headers.get("X-Data-Last-Updated");
      const ageSeconds = res.headers.get("X-Data-Age-Seconds");
    
      return {
        ok: res.ok,
        status: res.status,
        data,
        stale: stale === "true",
        lastUpdated: lastUpdated ?? undefined,
        ageSeconds: ageSeconds ? Number(ageSeconds) : undefined,
      };
    }
  • The stalenessWarning helper function used to generate stale data warnings in the 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, and the description only mentions cost and sources. It does not disclose whether the operation is read-only, rate limits, or other behavioral traits. Significant gap given the lack of 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?

Three sentences, front-loaded with the verb, and includes essential details without redundancy. Every sentence adds value.

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

Completeness4/5

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

For a simple query tool with three optional parameters and no output schema, the description adequately covers what data is returned and mentions sources and cost. Minor omission: could note default values for days and limit.

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 coverage is 100%, so baseline is 3. The description adds no additional meaning beyond the schema descriptions. It implies date-range filtering via 'upcoming' but doesn't elaborate on format or defaults.

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?

Description clearly states verb 'Get upcoming economic data releases' and specifies resources (dates, impact, prior values, forecasts). While it distinguishes from generic siblings, it does not explicitly differentiate from closely related tools like 'query_surprises' or '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?

Description includes cost and data sources, but provides no guidance on when to use this tool versus alternatives. With many economically themed siblings, explicit when-to-use/when-not-to-use information is missing.

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