Skip to main content
Glama

Search Grants.gov Opportunities

grantsgov_search_opportunities
Read-onlyIdempotent

Search federal funding opportunities on Grants.gov by keyword, agency, applicant eligibility, funding category, funding instrument, assistance listing, opportunity number, posting window (posted_within_days), or closing window (closing_within_days). Returns forecasted and posted opportunities unless statuses says otherwise, each row led by its close date and days remaining, plus facet counts for narrowing. Bare keyword terms are all required; join alternatives with OR, in parentheses when other terms stay required. Rows carry no award amounts or eligibility detail; read those with grantsgov_get_opportunity. Filter codes come from grantsgov_list_reference.

Input Schema

NameRequiredDescriptionDefault
sortNoResult order: relevance (best keyword match; needs keyword, otherwise the order is arbitrary), open_date_desc/open_date_asc (posting date), close_date_asc/close_date_desc (close date; no close date sorts last on asc), opportunity_number_asc/_desc, agency_asc/_desc. Default: relevance with a keyword, else open_date_desc.
limitNoRequested rows per page (1-1,000; default 25). Values above 100 return 100 rows with a notice.
offsetNoZero-based row offset for paging; use next_offset from the previous page.
keywordNoFull-text search over title, description, opportunity number, and agency. Bare terms are all required (rural broadband = rural AND broadband); join alternatives with OR, quote phrases ("mental health"), exclude with NOT or -term, and use a trailing * for prefixes (broad*). OR mixed with AND or with bare terms must be grouped in parentheses, e.g. (rural OR tribal) broadband; an ungrouped mix is rejected. A word with an internal hyphen or period (COVID-19, K-12) is matched as a phrase. Field prefixes (agency:NSF, cfda:93.866) are rejected: use the agencies, assistance_listing, or other filter instead. See grantsgov_list_reference topic keyword_syntax.
agenciesNoAgency codes from grantsgov_list_reference topic agencies (e.g. HHS, HHS-NIH11, NSF). One whole string or an array, up to 10 nonblank entries. A code includes its sub-agencies. Case-insensitive. Any listed agency matches.
statusesNoLifecycle statuses to include: forecasted, posted, closed, archived. One whole string or an array, up to 4 nonblank entries. Default: forecasted and posted.
eligibilitiesNoTwo-digit applicant-type codes from grantsgov_list_reference topic eligibilities (e.g. 12 = nonprofits with 501(c)(3) status, 07 = federally recognized tribal governments). One whole string or an array of strings or numbers, up to 17 nonblank entries. A single digit is zero-padded (7 = 07). Any listed type matches.
include_facetsNoInclude facet counts per filter value. Set false when paging to save space.
assistance_listingNoOne assistance listing number (ALN, formerly CFDA), e.g. 93.866 or 93866, in any case. Only one value is supported.
funding_categoriesNoFunding category codes from grantsgov_list_reference topic funding_categories (e.g. HL = Health, ED = Education). One whole string or an array, up to 28 nonblank entries. Case-insensitive. Any listed category matches.
opportunity_numberNoExact agency-assigned opportunity number (e.g. HRSA-27-005), matched case-insensitively; one pair of surrounding double quotes is removed. Numbers are not unique across agencies, so several rows can match. To look up a number across every status, prefer grantsgov_get_opportunity with opportunity_numbers.
posted_within_daysNoOnly opportunities posted in the last N days (1-3650). Works only with the forecasted and posted statuses.
closing_within_daysNoOnly posted opportunities closing between today and N days from today, US Eastern (0-365; 0 = closing today). Searches posted opportunities in close-date order, so statuses may only be posted and sort only close_date_asc.
funding_instrumentsNoFunding instruments: G (grant), CA (cooperative agreement), PC (procurement contract), O (other). One whole string or an array, up to 4 nonblank entries. Any listed instrument matches.
include_unrestrictedNoWhen eligibilities is set, also match opportunities open to any applicant type (code 99), which the specific codes do not cover. Set false to see only opportunities targeted at the listed types.

Output Schema

NameRequiredDescriptionDefault
capNoThe limit applied.
errorNoPresent when the call failed. Absent on success.
shownNoRows returned on this page.
facetsNoCounts per filter value for the current filters. Omitted when include_facets is false.
noticeNoZero-hit or window guidance naming the next call.
truncatedNoTrue when more scanned matches remain after this page or a closing-window scan is incomplete, including on an empty page.
totalCountNoMatching opportunities counted. In closing_within_days mode, total_count_kind says whether this is exact or a lower bound.
next_offsetNoOffset for the next reachable page of scanned matches; absent when none remain, even if the closing-window scan is incomplete.
opportunitiesNoMatching opportunities, deadline first.
applied_filtersNoFilters as the server applied them, including defaults and expansions.
reference_cacheNoDegraded reference-cache provenance when a filter uses stale vocabulary.
total_count_kindNoClosing-window count precision: exact after exhaustion or an observed boundary; lower_bound when unscanned rows may still qualify. Omitted in other modes.
effective_keywordNoThe keyword as compiled and sent upstream.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `invalid_keyword`: The keyword has unbalanced quotes or parentheses, a leading AND/OR, a trailing or doubled operator, or nothing left after removing unsupported characters. `unknown_agency`: An agencies code is neither a known agency code nor a hyphen-delimited prefix of one. `unknown_eligibility`: An eligibilities code is not in the applicant-type list. `unknown_funding_category`: A funding_categories code is not in the category list. `filter_conflict`: posted_within_days with closed or archived in statuses; closing_within_days with statuses other than posted or a sort other than close_date_asc. `upstream_unavailable`: Grants.gov did not respond, or returned a 5xx, a non-JSON body, a non-zero errorcode, or a backend-unavailable message, after retries. `rate_limited`: Grants.gov answered HTTP 429 (rate limited) through every retry, or asked for a wait longer than the retry budget. `upstream_route_unavailable`: Grants.gov answered HTTP 403 Missing Authentication Token: the search route no longer exists at the gateway. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_keyword`: The keyword has unbalanced quotes or parentheses, a leading AND/OR, a trailing or doubled operator, or nothing left after removing unsupported characters. `unknown_agency`: An agencies code is neither a known agency code nor a hyphen-delimited prefix of one. `unknown_eligibility`: An eligibilities code is not in the applicant-type list. `unknown_funding_category`: A funding_categories code is not in the category list. `filter_conflict`: posted_within_days with closed or archived in statuses; closing_within_days with statuses other than posted or a sort other than close_date_asc. `upstream_unavailable`: Grants.gov returned a malformed search page, or did not respond or returned a 5xx, a non-JSON body, a non-zero errorcode, or a backend-unavailable message after retries. `rate_limited`: Grants.gov answered HTTP 429 (rate limited) through every retry, or asked for a wait longer than the retry budget. `upstream_route_unavailable`: Grants.gov answered HTTP 403 Missing Authentication Token: the search route no longer exists at the gateway. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / next_offset / description
      Previous value: -"Offset for the next page; absent on the last page."New value: +"Offset for the next reachable page of scanned matches; absent when none remain, even if the closing-window scan is incomplete."
    • addedOutput schema / properties / reference_cache
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Degraded reference-cache provenance when a filter uses stale vocabulary.",
      +  "properties": {
      +    "reason": {
      +      "description": "Sanitized refresh failure reason.",
      +      "enum": [
      +        "upstream_unavailable",
      +        "upstream_route_unavailable",
      +        "rate_limited"
      +      ],
      +      "type": "string"
      +    },
      +    "retry_after": {
      +      "description": "ISO timestamp when a refresh can be attempted again.",
      +      "type": "string"
      +    },
      +    "snapshot_date": {
      +      "description": "ISO timestamp of the vocabulary used for validation.",
      +      "type": "string"
      +    },
      +    "status": {
      +      "const": "stale",
      +      "description": "The validation vocabulary is expired.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "reason",
      +    "retry_after",
      +    "snapshot_date"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / properties / totalCount / description
      Previous value: -"Total matching opportunities (the closing-window count in closing_within_days mode)."New value: +"Matching opportunities counted. In closing_within_days mode, total_count_kind says whether this is exact or a lower bound."
    • addedOutput schema / properties / total_count_kind
      Added value: +{
      +  "description": "Closing-window count precision: exact after exhaustion or an observed boundary; lower_bound when unscanned rows may still qualify. Omitted in other modes.",
      +  "enum": [
      +    "exact",
      +    "lower_bound"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / truncated / description
      Previous value: -"True when more rows exist past this page."New value: +"True when more scanned matches remain after this page or a closing-window scan is incomplete, including on an empty page."
  2. Changed28 schema fields changed
    • addedInput schema / properties / agencies / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "pattern": "^\\s*(?:(?:[A-Za-z0-9]+(?:[\\s-]+[A-Za-z0-9]+)*)\\s*)?$",
      +          "type": "string"
      +        },
      +        {
      +          "pattern": "^\\s*$",
      +          "type": "string"
      +        }
      +      ]
      +    },
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / agencies / description
      Previous value: -"Agency codes from grantsgov_list_reference topic agencies (e.g. HHS, HHS-NIH11, NSF). A code includes its sub-agencies. Case-insensitive. Any listed agency matches."New value: +"Agency codes from grantsgov_list_reference topic agencies (e.g. HHS, HHS-NIH11, NSF). One whole string or an array, up to 10 nonblank entries. A code includes its sub-agencies. Case-insensitive. Any listed agency matches."
    • removedInput schema / properties / agencies / items
      Removed value: -{
      -  "pattern": "^\\s*(?:(?:[A-Za-z0-9]+(?:[\\s-]+[A-Za-z0-9]+)*)\\s*)?$",
      -  "type": "string"
      -}
    • removedInput schema / properties / agencies / maxItems
      Removed value: -10
    • removedInput schema / properties / agencies / type
      Removed value: -"array"
    • addedInput schema / properties / eligibilities / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "anyOf": [
      +            {
      +              "pattern": "^\\s*(?:(?:\\d{1,2})\\s*)?$",
      +              "type": "string"
      +            },
      +            {
      +              "maximum": 99,
      +              "minimum": 0,
      +              "type": "integer"
      +            }
      +          ]
      +        },
      +        {
      +          "pattern": "^\\s*$",
      +          "type": "string"
      +        }
      +      ]
      +    },
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / eligibilities / description
      Previous value: -"Two-digit applicant-type codes from grantsgov_list_reference topic eligibilities (e.g. 12 = nonprofits with 501(c)(3) status, 07 = federally recognized tribal governments), as strings or numbers. A single digit is zero-padded (7 = 07). Any listed type matches."New value: +"Two-digit applicant-type codes from grantsgov_list_reference topic eligibilities (e.g. 12 = nonprofits with 501(c)(3) status, 07 = federally recognized tribal governments). One whole string or an array of strings or numbers, up to 17 nonblank entries. A single digit is zero-padded (7 = 07). Any listed type matches."
    • removedInput schema / properties / eligibilities / items
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "pattern": "^\\s*(?:(?:\\d{1,2})\\s*)?$",
      -      "type": "string"
      -    },
      -    {
      -      "maximum": 99,
      -      "minimum": 0,
      -      "type": "integer"
      -    }
      -  ]
      -}
    • removedInput schema / properties / eligibilities / maxItems
      Removed value: -17
    • removedInput schema / properties / eligibilities / type
      Removed value: -"array"
    • addedInput schema / properties / funding_categories / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "pattern": "^\\s*(?:(?:[A-Za-z]{1,4})\\s*)?$",
      +          "type": "string"
      +        },
      +        {
      +          "pattern": "^\\s*$",
      +          "type": "string"
      +        }
      +      ]
      +    },
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / funding_categories / description
      Previous value: -"Funding category codes from grantsgov_list_reference topic funding_categories (e.g. HL = Health, ED = Education). Case-insensitive. Any listed category matches."New value: +"Funding category codes from grantsgov_list_reference topic funding_categories (e.g. HL = Health, ED = Education). One whole string or an array, up to 28 nonblank entries. Case-insensitive. Any listed category matches."
    • removedInput schema / properties / funding_categories / items
      Removed value: -{
      -  "pattern": "^\\s*(?:(?:[A-Za-z]{1,4})\\s*)?$",
      -  "type": "string"
      -}
    • removedInput schema / properties / funding_categories / maxItems
      Removed value: -28
    • removedInput schema / properties / funding_categories / type
      Removed value: -"array"
    • addedInput schema / properties / funding_instruments / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "enum": [
      +            "G",
      +            "CA",
      +            "PC",
      +            "O"
      +          ],
      +          "type": "string"
      +        },
      +        {
      +          "pattern": "^\\s*$",
      +          "type": "string"
      +        }
      +      ]
      +    },
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / funding_instruments / description
      Previous value: -"Funding instruments: G (grant), CA (cooperative agreement), PC (procurement contract), O (other). Any listed instrument matches."New value: +"Funding instruments: G (grant), CA (cooperative agreement), PC (procurement contract), O (other). One whole string or an array, up to 4 nonblank entries. Any listed instrument matches."
    • removedInput schema / properties / funding_instruments / items
      Removed value: -{
      -  "enum": [
      -    "G",
      -    "CA",
      -    "PC",
      -    "O"
      -  ],
      -  "type": "string"
      -}
    • removedInput schema / properties / funding_instruments / maxItems
      Removed value: -4
    • removedInput schema / properties / funding_instruments / type
      Removed value: -"array"
    • changedInput schema / properties / limit / description
      Previous value: -"Rows per page (1-100)."New value: +"Requested rows per page (1-1,000; default 25). Values above 100 return 100 rows with a notice."
    • changedInput schema / properties / limit / maximum
      Previous value: -100New value: +1000
    • addedInput schema / properties / statuses / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "enum": [
      +            "forecasted",
      +            "posted",
      +            "closed",
      +            "archived"
      +          ],
      +          "type": "string"
      +        },
      +        {
      +          "pattern": "^\\s*$",
      +          "type": "string"
      +        }
      +      ]
      +    },
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / statuses / description
      Previous value: -"Lifecycle statuses to include: forecasted, posted, closed, archived. Default: forecasted and posted."New value: +"Lifecycle statuses to include: forecasted, posted, closed, archived. One whole string or an array, up to 4 nonblank entries. Default: forecasted and posted."
    • removedInput schema / properties / statuses / items
      Removed value: -{
      -  "enum": [
      -    "forecasted",
      -    "posted",
      -    "closed",
      -    "archived"
      -  ],
      -  "type": "string"
      -}
    • removedInput schema / properties / statuses / maxItems
      Removed value: -4
    • removedInput schema / properties / statuses / type
      Removed value: -"array"
    • changedOutput schema / properties / facets / properties / sub_agencies / description
      Previous value: -"Counts per sub-agency code under the top-level agencies in the result. Present only when agencies is set."New value: +"Current-query subtree counts per sub-agency, including known intermediate parents. Present only when agencies is set. Number mode retains upstream facet scope; closing-window facets cover the wider posted set."
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the read-only and idempotent annotations, the description discloses the default status scope (forecasted and posted), row ordering around close date and days remaining, facet counts, and the absence of award/eligibility detail in results. It also explains key keyword behavior, including required bare terms and OR grouping rules.

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?

The description is front-loaded with purpose and filters, then adds return behavior, keyword syntax, detail limitations, and sibling routing. It is appropriately sized for a 15-parameter search tool, with each sentence serving a distinct function.

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?

Given the rich schema, annotations, output schema, and sibling tools, the description provides enough context to search correctly and to know when to switch tools. It covers defaults, result limitations, and filter-code sourcing without needing to restate the full schema.

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 the schema already carries the detailed parameter semantics. The description summarizes the filter dimensions and keyword grouping behavior, but mostly repeats information available in the schema rather than adding substantially new parameter meaning.

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 states a specific verb and resource ('Search federal funding opportunities on Grants.gov') and enumerates the main filter dimensions. It also distinguishes the tool from its siblings by routing award/eligibility detail to grantsgov_get_opportunity and filter-code lookup to grantsgov_list_reference.

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 clearly indicates when to use sibling tools: read award amounts or eligibility detail with grantsgov_get_opportunity, and look up filter codes with grantsgov_list_reference. It does not explicitly state when to prefer this search over a direct opportunity lookup, leaving that nuance to the opportunity_number schema text.

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.