Skip to main content
Glama

contract_stats

Access government contract statistics including total awards, agency coverage, date ranges, and data sources to analyze federal procurement activity.

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 handler function for the `contract_stats` tool, which fetches data from the `/api/v1/contracts/stats` endpoint and returns it as a formatted JSON string.
      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 registration of the `contract_stats` tool with the McpServer instance.
    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: {},
      },
  • The TypeScript interface defining the structure of the response for the `contract_stats` tool.
    interface ContractStatsResponse {
      dataset: string;
      source: string;
      update_frequency: string;
      stats: Record<string, unknown>;
    }

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