Skip to main content
Glama

Top Government Contract Vendors

top_vendors

Query vendor rankings by total award value from USAspending.gov. Filter by agency and time period to get top contractors with award amounts and contract counts.

Instructions

Get vendor rankings by total award value. Shows top contractors by agency, total awards, and contract counts. Cost: $0.03 per query. Source: USAspending.gov.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agencyNoFilter by awarding agency
periodNoTime period for ranking (default: 1y)
limitNoMaximum results (default 25)

Implementation Reference

  • The async handler function for 'top_vendors' tool. Calls apiGet to /api/v1/contracts/vendors with agency, period, and limit params, then formats the response as text.
      async ({ agency, period, limit }) => {
        const res = await apiGet<ContractQueryResponse>("/api/v1/contracts/vendors", {
          agency,
          period: period ?? "1y",
          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} vendor(s).`;
        const json = JSON.stringify(data, null, 2);
    
        return {
          content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
        };
      },
    );
  • Input schema for 'top_vendors': optional agency (string), period (enum: 1y/3y/5y/all), and limit (number, 1-100).
    inputSchema: {
      agency: z
        .string()
        .optional()
        .describe("Filter by awarding agency"),
      period: z
        .enum(["1y", "3y", "5y", "all"])
        .optional()
        .describe("Time period for ranking (default: 1y)"),
      limit: z
        .number()
        .int()
        .min(1)
        .max(100)
        .optional()
        .describe("Maximum results (default 25)"),
    },
  • Registration of 'top_vendors' tool via server.registerTool(), including title, description, inputSchema, and handler.
    server.registerTool(
      "top_vendors",
      {
        title: "Top Government Contract Vendors",
        description:
          "Get vendor rankings by total award value. Shows top contractors by agency, " +
          "total awards, and contract counts. " +
          "Cost: $0.03 per query. Source: USAspending.gov.",
        inputSchema: {
          agency: z
            .string()
            .optional()
            .describe("Filter by awarding agency"),
          period: z
            .enum(["1y", "3y", "5y", "all"])
            .optional()
            .describe("Time period for ranking (default: 1y)"),
          limit: z
            .number()
            .int()
            .min(1)
            .max(100)
            .optional()
            .describe("Maximum results (default 25)"),
        },
      },
      async ({ agency, period, limit }) => {
        const res = await apiGet<ContractQueryResponse>("/api/v1/contracts/vendors", {
          agency,
          period: period ?? "1y",
          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} vendor(s).`;
        const json = JSON.stringify(data, null, 2);
    
        return {
          content: [{ type: "text" as const, text: `${summary}\n\n${json}` }],
        };
      },
    );
  • src/index.ts:53-53 (registration)
    The registerContractTools(server) call that wires up the contract tools including 'top_vendors' into the MCP server.
    registerContractTools(server);
  • The apiGet helper 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,
      };
    }
Behavior2/5

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

No annotations provided, so description must disclose behavioral traits. It mentions cost ($0.03/query) and data source (USAspending.gov), but lacks details on rate limits, error handling, or data freshness.

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 clearly stating purpose, output, and cost/source. No unnecessary words, and the key action is front-loaded.

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?

With no output schema, the description gives a partial picture of return data (agency, total awards, contract counts). However, it omits other possible fields, result format, and behavior for empty results, making it moderately complete.

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% with descriptions for all three parameters (agency, period, limit). The description adds no additional semantic context beyond the schema, meeting the baseline for high coverage.

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 vendor rankings by total award value and lists output fields (agency, total awards, contract counts). However, it does not differentiate from sibling tools like 'contract_stats' or 'search_contracts', which could also provide government spending data.

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. It does not mention exclusions, prerequisites, or situations where other tools might be more appropriate.

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