Skip to main content
Glama

Contracts Dataset Statistics

contract_stats

Retrieve key statistics from the government contracts dataset, including total awards, agencies covered, date range, and data source information.

Instructions

Get statistics about the government contracts dataset: total awards, agencies covered, date range, and data source information. Free endpoint.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The async handler function for the contract_stats tool. Calls GET /api/v1/contracts/stats and returns JSON with dataset stats.
      async () => {
        const res = await apiGet<ContractStatsResponse>("/api/v1/contracts/stats");
    
        if (!res.ok) {
          return {
            content: [
              {
                type: "text" as const,
                text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
              },
            ],
            isError: true,
          };
        }
    
        return {
          content: [
            { type: "text" as const, text: JSON.stringify(res.data, null, 2) },
          ],
        };
      },
    );
  • The ContractStatsResponse interface defining the shape of the API response (dataset, source, update_frequency, stats).
    interface ContractStatsResponse {
      dataset: string;
      source: string;
      update_frequency: string;
      stats: Record<string, unknown>;
    }
  • Registration of the 'contract_stats' tool on the MCP server with its title, description, empty inputSchema, and handler.
    server.registerTool(
      "contract_stats",
      {
        title: "Contracts Dataset Statistics",
        description:
          "Get statistics about the government contracts dataset: total awards, " +
          "agencies covered, date range, and data source information. Free endpoint.",
        inputSchema: {},
  • src/index.ts:53-53 (registration)
    The entry point registration calling registerContractTools(server) which registers contract_stats among other contract tools.
    registerContractTools(server);
  • The apiGet helper function used by contract_stats handler to make the GET request to /api/v1/contracts/stats.
    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,
      };
    }
Behavior2/5

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

No annotations are provided, so the description bears full responsibility for behavioral traits. It only notes 'Free endpoint,' which addresses cost but not side effects, safety, or whether the tool modifies data. A read-only query is assumed, but not explicitly confirmed. This is insufficient for full transparency.

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 sentence that front-loads the key purpose and specifics. Every word is necessary and informative. No wasted or redundant text.

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?

Given the simplicity (no parameters, no output schema, no annotations), the description is fairly complete. It lists the types of statistics returned (total awards, agencies, date range, data source), which is sufficient for an agent to assess relevance. Lacks mention of data freshness or formatting, but this is minor for a stats-only tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no parameters (0 params), so the baseline score is 4 per the rubric. The description does not need to add parameter semantics, and it correctly does not add any superfluous information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it gets statistics about the government contracts dataset and lists specific details (total awards, agencies, date range, data source). The verb 'Get' and the resource 'government contracts dataset' are specific, and the tool name and title reinforce this. Siblings like 'crypto_stats' or 'dex_stats' are for different datasets, so it is well-distinguished.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions 'Free endpoint' which is a usage guideline (cost), but it does not explicitly state when to use this tool versus alternatives like 'search_contracts' or 'top_vendors'. The sibling tools are for different datasets, so usage context is implied, but lacking explicit when-not or alternative guidance.

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