Skip to main content
Glama

get_federal_contracts

Read-only

Federal prime contract awards (types A-D) from api.usaspending.gov, queried live over the full dataset (October 2007 on); in an outage, a recent cached window (source 'cache'). One row per award; award_amount includes modifications to date. award_amount and total_outlays may be null (not reported), not $0. total_count is USAspending's count for the whole query. Detail: keyvex.com/docs/tools/get_federal_contracts

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_federal_contracts"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoDefault 50.
sinceNoYYYY-MM-DD, inclusive, on last_modified_date, or start_date if sorted by it.
untilNoInclusive, same field as since.
sort_byNoDefault last_modified_date.
psc_codeNo4-character product or service code, exact.
min_amountNoUSD, inclusive, on award_amount.
naics_codeNo6-digit NAICS industry code, exact.
sort_orderNoDefault desc.
recipient_ueiNo12 characters; that UEI's own awards only.
recipient_nameNoCase-insensitive substring; also matches parent names.
awarding_agencyNoExact, case-sensitive TOPTIER name, e.g. 'Department of Defense' (not 'DoD').

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • changedInput schema / properties / awarding_agency / description
      Previous value: -"The TOPTIER awarding agency name — exact and case-sensitive; a sub-agency name (e.g. 'Defense Logistics Agency') or an abbreviation ('NASA') matches nothing. Examples: 'Department of Defense', 'National Aeronautics and Space Administration', 'Department of Health and Human Services'."New value: +"Exact, case-sensitive TOPTIER name, e.g. 'Department of Defense' (not 'DoD')."
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum records to return. Default 50, max 500."New value: +"Default 50."
    • changedInput schema / properties / min_amount / description
      Previous value: -"Filter to awards with award_amount >= this value (USD). Use to focus on large contracts."New value: +"USD, inclusive, on award_amount."
    • changedInput schema / properties / naics_code / description
      Previous value: -"6-digit North American Industry Classification System code. Example: '541710' (R&D in Physical/Engineering/Life Sciences). Exact match."New value: +"6-digit NAICS industry code, exact."
    • changedInput schema / properties / psc_code / description
      Previous value: -"Product or Service Code (4-character). Example: 'AR33' (R&D Space Flight Advanced Development). Exact match."New value: +"4-character product or service code, exact."
    • changedInput schema / properties / recipient_name / description
      Previous value: -"Recipient name substring; case-insensitive match. Example: 'Lockheed Martin' matches 'LOCKHEED MARTIN CORP', 'LOCKHEED MARTIN MISSILES AND FIRE CONTROL', etc. USAspending also matches the PARENT company's name, so a parent name returns its subsidiaries' awards (e.g. Sikorsky under 'Lockheed Martin'). Combined with recipient_uei it is matched against that recipient's OWN name instead, and coverage_warning says how many awards it removed."New value: +"Case-insensitive substring; also matches parent names."
    • changedInput schema / properties / recipient_uei / description
      Previous value: -"Unique Entity Identifier (replaced DUNS in 2022). 12-character alphanumeric. Exact match: only awards made to this UEI itself. If it is also the parent of other recipients, their awards are NOT included and total_count is omitted — coverage_warning names the parent; use recipient_name with that name for the whole family."New value: +"12 characters; that UEI's own awards only."
    • changedInput schema / properties / since / description
      Previous value: -"ISO date (YYYY-MM-DD). Only records on or after this date — on last_modified_date, except when sort_by is start_date, where it applies to start_date."New value: +"YYYY-MM-DD, inclusive, on last_modified_date, or start_date if sorted by it."
    • changedInput schema / properties / sort_by / description
      Previous value: -"Field used for ordering. since/until apply to start_date when this is start_date, and to last_modified_date for every other sort. Default: last_modified_date (most-recently-modified first)."New value: +"Default last_modified_date."
    • changedInput schema / properties / sort_order / description
      Previous value: -"Default: desc."New value: +"Default desc."
    • changedInput schema / properties / until / description
      Previous value: -"ISO date (YYYY-MM-DD). Only records on or before this date (the same date field as since)."New value: +"Inclusive, same field as since."
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly/openWorld/non-destructive, and the description adds real behavior: live query over the full October 2007-onward dataset with a cached window during outages, one row per award, amounts including modifications, and null-means-unreported. It stops short of describing pagination limits or how the 'source' field surfaces in the response.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense and front-loaded: the data source and coverage window lead, then row grain, then amount caveats, then a docs pointer. The semicolon-chained clauses are efficient but slightly cramped to read.

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

Completeness5/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 carries the return-value burden and does so — row grain, amount modification semantics, null handling, and total_count meaning. For a read-only query tool over a live public dataset, nothing essential for a correct call is missing.

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 description coverage is 100%, so all 11 parameters are already documented, including enum defaults and the TOPTIER agency-name caveat. The description adds only result-level semantics (total_count is USAspending's whole-query count) rather than per-parameter meaning, so the baseline of 3 applies.

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?

States a specific verb and resource — 'Federal prime contract awards (types A-D) from api.usaspending.gov' — with the scope of the underlying dataset. That is enough to separate it from siblings like get_federal_grants without opening a schema.

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 live-vs-cache note implies when the tool is usable, but there is no explicit when-to-use guidance, no exclusions, and no named alternative for related needs. Usage has to be inferred from the resource description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources