Skip to main content
Glama

Search Historical Opportunities

search_historical_opportunities
Read-onlyIdempotent

Search Grants.gov's FULL opportunity history (closed and archived opportunities back to 2004, plus forecasted opportunities not yet posted), coverage search_opportunities' live API cannot serve, since search2 only usefully answers "what is open right now". Covers Grants.gov's full catalog, refreshed once a day (see data_as_of). Filter by agency code, CFDA/Assistance Listing number, keyword (full-text over title + description), status, opportunity category, or post-date range. Unlike search_opportunities, status here defaults to EVERY status, not just "posted", pass status explicitly to narrow. Answers "what did this agency fund last fiscal year", "what opportunities under CFDA 93.351 have ever closed", "what is forecasted for next year that hasn't posted yet".

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "limit": 10,
      "status": "closed",
      "agency_code": "NIH"
    },
    "name": "search_historical_opportunities"
  }
}

Input Schema

NameRequiredDescriptionDefault
alnNoAlias for cfda.
cfdaNoAssistance Listing Number / CFDA number, exact match, e.g. "93.351". Alias: aln.
limitNoRows to return, 1-500 (default 25).
agencyNoAlias for agency_code.
offsetNo0-based start record, for paging.
statusNoposted (open now) | closed | archived | forecasted (not yet posted). One value. There is no "open" or "active" status: use "posted" for opportunities open for applications. Omit to search every status, unlike the live tool (whose default is "posted").
keywordNoFull-text search over the opportunity title and description (PostgreSQL websearch syntax, quote a phrase, "-word" to exclude). More forgiving than the live tool's exact-phrase keyword match.
agency_codeNoAgency or sub-agency code, e.g. "NIH" or "HHS-NIH11" or "DOS". Matches as a prefix/segment against the fully-qualified codes on file (same bare-vs-qualified forgiveness as search_opportunities' `agencies`). Alias: agency.
post_date_toNoOnly opportunities posted on/before this date, YYYY-MM-DD.
post_date_fromNoOnly opportunities posted on/after this date, YYYY-MM-DD.
opportunity_categoryNoSingle-letter Grants.gov category code: D discretionary, M mandatory, C continuation, E earmark, O other.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / keyword / description
      Previous value: -"Full-text search over the opportunity title and description (PostgreSQL websearch syntax — quote a phrase, \"-word\" to exclude). More forgiving than the live tool's exact-phrase keyword match."New value: +"Full-text search over the opportunity title and description (PostgreSQL websearch syntax, quote a phrase, \"-word\" to exclude). More forgiving than the live tool's exact-phrase keyword match."
  2. Changed2 schema fields changed
    • changedInput schema / properties / status / description
      Previous value: -"posted | closed | archived | forecasted. Omit to search every status, unlike the live tool (whose default is \"posted\")."New value: +"posted (open now) | closed | archived | forecasted (not yet posted). One value. There is no \"open\" or \"active\" status: use \"posted\" for opportunities open for applications. Omit to search every status, unlike the live tool (whose default is \"posted\")."
    • addedInput schema / properties / status / enum
      Added value: +[
      +  "posted",
      +  "closed",
      +  "archived",
      +  "forecasted"
      +]
  3. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds genuinely new behavior: coverage window back to 2004, inclusion of forecasted records, a once-a-day refresh surfaced via `data_as_of`, and the critical divergence that status defaults to EVERY status here versus 'posted' on the live tool. That default-difference disclosure is exactly the kind of trap that causes wrong calls.

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?

Front-loaded with scope and the sibling contrast, and nearly every clause carries information. The opening sentence is overlong and grammatically tangled ('coverage search_opportunities' live API cannot serve'), which costs a little readability.

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 an 11-parameter, no-required-parameter search tool this covers scope, freshness, defaults, filtering, and use cases thoroughly. With no output schema, it never indicates what a result row contains, which is the one remaining gap an agent would want before calling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema carries the field definitions and the baseline would be 3. The description still adds meaning beyond it: the enumerated filter set, the status default behavior versus the live tool, and the note that keyword is full-text/websearch-style and 'more forgiving than the live tool's exact-phrase keyword match'.

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 and immediately bounds the scope: 'Grants.gov's FULL opportunity history (closed and archived opportunities back to 2004, plus forecasted opportunities not yet posted)'. It explicitly contrasts with the sibling search_opportunities, so an agent can route between the two 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 Guidelines5/5

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

Names the alternative ('search_opportunities' live API ... since search2 only usefully answers "what is open right now"') and gives three concrete example questions that select this tool. It also warns to pass status explicitly because the default differs from the sibling.

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.