Skip to main content
Glama
cliwant

mcp-sam-gov

by cliwant

usas_get_award_detail

Retrieve full award details including period of performance, set-aside type, competition extent, and number of offers by providing the award's generated internal ID.

Instructions

Fetch full detail for a single award by generatedInternalId (from usas_search_individual_awards). Returns period_of_performance (start/end/potential_end), base_and_all_options, set-aside type, competition extent, number_of_offers — the per-award fields the search endpoint omits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
generatedInternalIdYesFrom spending_by_award results — e.g. CONT_AWD_*

Implementation Reference

  • The actual handler function for usas_get_award_detail. Calls the USAspending awards/{generated_internal_id} API endpoint and returns full award detail including period_of_performance, base_and_all_options, set-aside type, competition extent, and number_of_offers.
    export async function getAwardDetail(generatedInternalId: string) {
      try {
        const r = await fetch(
          `${USAS}/awards/${encodeURIComponent(generatedInternalId)}/`,
          { signal: AbortSignal.timeout(10_000) },
        );
        if (!r.ok) return null;
        type Resp = {
          piid?: string;
          description?: string;
          total_obligation?: number;
          base_and_all_options?: number;
          period_of_performance?: {
            start_date?: string;
            end_date?: string;
            potential_end_date?: string;
          };
          latest_transaction_contract_data?: {
            type_set_aside?: string;
            type_set_aside_description?: string;
            extent_competed?: string;
            number_of_offers_received?: string;
            naics?: string;
            naics_description?: string;
          };
          awarding_agency?: {
            toptier_agency?: { name?: string };
            subtier_agency?: { name?: string };
          };
          recipient?: { recipient_name?: string };
        };
        const json = (await r.json()) as Resp;
        const ltc = json.latest_transaction_contract_data ?? {};
        return {
          awardId: json.piid ?? "",
          recipient: json.recipient?.recipient_name ?? "",
          totalObligation: json.total_obligation ?? 0,
          baseAndAllOptions: json.base_and_all_options ?? 0,
          periodOfPerformance: {
            startDate: json.period_of_performance?.start_date ?? null,
            endDate: json.period_of_performance?.end_date ?? null,
            potentialEndDate: json.period_of_performance?.potential_end_date ?? null,
          },
          description: json.description ?? "",
          setAsideType: ltc.type_set_aside,
          setAsideDescription: ltc.type_set_aside_description,
          competitionExtent: ltc.extent_competed,
          numberOfOffers: ltc.number_of_offers_received,
          awardingAgency: json.awarding_agency?.toptier_agency?.name,
          awardingSubAgency: json.awarding_agency?.subtier_agency?.name,
          naicsCode: ltc.naics,
          naicsDescription: ltc.naics_description,
        };
      } catch {
        return null;
      }
    }
  • Zod input schema for usas_get_award_detail. Defines the 'generatedInternalId' parameter (string, described as coming from spending_by_award results, e.g. CONT_AWD_*).
    const UsasAwardDetailInput = z.object({
      generatedInternalId: z
        .string()
        .describe("From spending_by_award results — e.g. CONT_AWD_*"),
    });
  • src/server.ts:712-715 (registration)
    Tool registration in the runTool switch statement. Parses the input with UsasAwardDetailInput and calls usas.getAwardDetail().
    case "usas_get_award_detail":
      return await usas.getAwardDetail(
        UsasAwardDetailInput.parse(args).generatedInternalId,
      );
  • src/server.ts:362-367 (registration)
    Tool definition entry in the TOOLS array listing usas_get_award_detail with its description and inputSchema reference.
    {
      name: "usas_get_award_detail",
      description:
        "Fetch full detail for a single award by generatedInternalId (from usas_search_individual_awards). Returns period_of_performance (start/end/potential_end), base_and_all_options, set-aside type, competition extent, number_of_offers — the per-award fields the search endpoint omits.",
      inputSchema: UsasAwardDetailInput,
    },
Behavior2/5

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

No annotations provided. Description lacks behavioral disclosure (e.g., read-only, side effects, rate limits, auth). Only states returned fields, not operational traits.

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?

Two focused sentences, front-loaded with purpose, then return details. No unnecessary words.

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?

Adequately describes return fields for a detail-fetch tool. Lacks mention of error handling (e.g., invalid ID) but acceptable given simplicity.

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 has 100% coverage with parameter description. Tool description repeats source but adds no new semantic value beyond schema.

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?

Clear verb 'Fetch' with specific resource 'full detail for a single award' and identifier source 'from usas_search_individual_awards'. Distinguishes from sibling by noting it returns fields the search omits.

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

Usage Guidelines5/5

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

Explicitly states the prerequisite sibling tool and the gap it fills ('fields the search endpoint omits'), providing clear when-to-use 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/cliwant/mcp-sam-gov'

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