Skip to main content
Glama

usaspending-mcp-server

Search Award Recipients

usaspending_search_recipients
Read-onlyIdempotent

Search for organizations or individuals receiving federal funds by name, UEI (Unique Entity Identifier), or DUNS. Returns recipient hash IDs, UEI/DUNS identifiers, total award amounts, and hierarchy level. Results are paginated — use page to retrieve matches beyond the first page; page_metadata.total reports the full match count. Recipient hash IDs from this tool can be passed to usaspending_get_recipient for full profiles. Recipient level: P = parent organization, C = child entity, R = standalone.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "keyword": "<keyword>"
    },
    "name": "usaspending_search_recipients"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoPage number (1-based) — request the next page to retrieve matches beyond the first
limitNoMaximum results per page (1–100)
keywordYesName, UEI, DUNS, or keyword to search for — partial matches are supported. Surrounding whitespace is trimmed; blank text applies no keyword filter and is disclosed.
award_typeNoFilter by award type category to scope the total amounts returned

Output Schema

NameRequiredDescriptionDefault
pageNoCurrent page number returned
errorNoPresent when the call failed. Absent on success.
noticeNoBlank-keyword disclosure and pagination recovery. An empty page is distinguished from a known zero total; absent when no notice applies.
resultsNoMatching recipients
has_nextNoWhether there are more pages of results
totalCountNoTotal matching recipients across all pages
page_metadataNoPagination metadata — page through with the page input to reach later matches
recipient_countNoNumber of matching recipients returned on this page

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / results / items / properties / id / description
      Previous value: -"Recipient hash ID (UUID format with level suffix: -P parent, -C child, -R standalone) — pass to usaspending_get_recipient for full profile"New value: +"Recipient hexadecimal 8-4-4-4-12 hash with level suffix: -P parent, -C child, -R standalone — pass to usaspending_get_recipient for full profile"
  2. Changed2 schema fields changed
    • changedInput schema / properties / keyword / description
      Previous value: -"Name, UEI, DUNS, or keyword to search for — partial matches are supported"New value: +"Name, UEI, DUNS, or keyword to search for — partial matches are supported. Surrounding whitespace is trimmed; blank text applies no keyword filter and is disclosed."
    • changedOutput schema / properties / notice / description
      Previous value: -"Recovery hint — how to continue to the next page when more results exist, or how to broaden the search when empty. Absent when the full match set fits on this page."New value: +"Blank-keyword disclosure and pagination recovery. An empty page is distinguished from a known zero total; absent when no notice applies."
  3. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "results",
      +      "page_metadata",
      +      "recipient_count",
      +      "page",
      +      "has_next"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `api_unavailable`: USAspending.gov API is unreachable or returns an error. `api_timeout`: USAspending.gov did not respond before the request deadline elapsed. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "api_unavailable",
      +            "api_timeout"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "results",
      -  "page_metadata",
      -  "recipient_count",
      -  "page",
      -  "has_next"
      -]
  4. Changed15 schema fields changed
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum results to return (1–100)"New value: +"Maximum results per page (1–100)"
    • addedInput schema / properties / page
      Added value: +{
      +  "default": 1,
      +  "description": "Page number (1-based) — request the next page to retrieve matches beyond the first",
      +  "maximum": 9007199254740991,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • removedOutput schema / properties / cap
      Removed value: -{
      -  "description": "The limit that was applied.",
      -  "type": "number"
      -}
    • addedOutput schema / properties / has_next
      Added value: +{
      +  "description": "Whether there are more pages of results",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / notice / description
      Previous value: -"Recovery hint when results are empty — suggests how to broaden the search. Absent when results are present."New value: +"Recovery hint — how to continue to the next page when more results exist, or how to broaden the search when empty. Absent when the full match set fits on this page."
    • addedOutput schema / properties / page
      Added value: +{
      +  "description": "Current page number returned",
      +  "type": "number"
      +}
    • addedOutput schema / properties / page_metadata
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Pagination metadata — page through with the page input to reach later matches",
      +  "properties": {
      +    "has_next": {
      +      "description": "Whether there are more pages of results",
      +      "type": "boolean"
      +    },
      +    "limit": {
      +      "description": "Results per page",
      +      "type": "number"
      +    },
      +    "page": {
      +      "description": "Current page number",
      +      "type": "number"
      +    },
      +    "total": {
      +      "description": "Total matching recipients across all pages",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "page",
      +    "has_next",
      +    "limit"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / properties / recipient_count / description
      Previous value: -"Number of matching recipients returned"New value: +"Number of matching recipients returned on this page"
    • removedOutput schema / properties / results / items / properties / location
      Removed value: -{
      -  "additionalProperties": false,
      -  "description": "Recipient address location",
      -  "properties": {
      -    "city_name": {
      -      "description": "City of recipient address",
      -      "type": "string"
      -    },
      -    "country_code": {
      -      "description": "Country code",
      -      "type": "string"
      -    },
      -    "state_code": {
      -      "description": "State code",
      -      "type": "string"
      -    }
      -  },
      -  "type": "object"
      -}
    • removedOutput schema / properties / results / items / properties / state
      Removed value: -{
      -  "description": "State code of recipient address",
      -  "type": "string"
      -}
    • removedOutput schema / properties / shown
      Removed value: -{
      -  "description": "Number of recipients returned.",
      -  "type": "number"
      -}
    • removedOutput schema / properties / total
      Removed value: -{
      -  "description": "Number of results returned",
      -  "type": "number"
      -}
    • addedOutput schema / properties / totalCount
      Added value: +{
      +  "description": "Total matching recipients across all pages",
      +  "type": "number"
      +}
    • removedOutput schema / properties / truncated
      Removed value: -{
      -  "description": "True when results were capped at the limit.",
      -  "type": "boolean"
      -}
    • changedOutput schema / required
      Previous value: -[
      -  "results",
      -  "total",
      -  "recipient_count"
      -]New value: +[
      +  "results",
      +  "page_metadata",
      +  "recipient_count",
      +  "page",
      +  "has_next"
      +]
  5. Changed3 schema fields changed
    • addedOutput schema / properties / cap
      Added value: +{
      +  "description": "The limit that was applied.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / shown
      Added value: +{
      +  "description": "Number of recipients returned.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "True when results were capped at the limit.",
      +  "type": "boolean"
      +}
  6. Changed4 schema fields changed
    • removedOutput schema / properties / message
      Removed value: -{
      -  "description": "Recovery hint when results are empty — suggests how to broaden the search. Absent when results are present.",
      -  "type": "string"
      -}
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Recovery hint when results are empty — suggests how to broaden the search. Absent when results are present.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / recipient_count
      Added value: +{
      +  "description": "Number of matching recipients returned",
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "results",
      -  "total"
      -]New value: +[
      +  "results",
      +  "total",
      +  "recipient_count"
      +]
  7. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, openWorld), and the description adds real behavioral context on top: pagination behavior, the page_metadata.total full-match count, and the P/C/R recipient hierarchy legend that is not derivable from annotations. The return-field enumeration partially duplicates the output schema, so it is not fully additive.

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?

Well structured and front-loaded: identity of the tool first, then pagination, then the handoff to the sibling, then the level legend. Each sentence is purposeful, though the enumerated return fields are mildly redundant given an output schema exists.

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?

For a four-parameter search tool with a full output schema and read-only annotations, the description covers capability, pagination, follow-up routing, and the code legend well. Minor omissions remain, such as behavior on zero matches or result ordering, but nothing essential to correct invocation 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 coverage is 100%, so the schema already documents keyword, page, limit, and award_type with defaults, ranges, and enum values. The description restates the pagination meaning of page but adds no new syntax or formatting guidance beyond what the schema provides; the P/C/R legend explains output, not an input parameter.

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 opens with a specific verb and resource — 'Search for organizations or individuals receiving federal funds' — and names the exact lookup keys (name, UEI, DUNS). It is clearly distinguishable from the sibling usaspending_get_recipient, which it explicitly frames as the follow-up profile lookup.

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

Usage Guidelines4/5

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

It gives a clear routing rule: use this tool to find recipients, then pass the returned hash ID to usaspending_get_recipient for full profiles. It also explains the pagination workflow via page and page_metadata.total. It stops short of an explicit exclusion (e.g., when to prefer autocomplete or award search instead), so it is strong but not exhaustive.

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.