# Search Federal Grant Awards

`Search_Federal_Grant_Awards` returns federal grant award records with spending, recipient, agency, and program context from GovTribe's grant-award dataset.

## When To Use

* "Find grant awards for this topic, recipient, agency, or program."
* "Show the top awardees/agencies/programs by dollars obligated."
* "Find a specific federal grant award by known ID or exact title text."
* "Compare funding agency vs contracting agency funding patterns."
* "Limit to grant type (Project, Formula, Cooperative, Block) and analyze obligations."
* "Run rollups only (`per_page: 0`) or rollups plus sample rows (`per_page > 0`)."

## Required Reading

1. [Search\_Query\_Guide](https://docs.govtribe.com/user-guide/mcp/guides/search_query_guide): Required before setting free-text query strings when search\_mode is used.
2. [Search\_Mode\_Guide](https://docs.govtribe.com/user-guide/mcp/guides/search_mode_guide): Required before choosing keyword vs semantic retrieval.
3. [Date\_Filtering\_Guide](https://docs.govtribe.com/user-guide/mcp/guides/date_filtering_guide): Required before setting date window filters.
4. [Location\_Filtering\_Guide](https://docs.govtribe.com/user-guide/mcp/guides/location_filtering_guide): Required before setting location filters.

## Input Contract

* `query`: Free-text query string. See Required Reading: [Search\_Query\_Guide](https://docs.govtribe.com/user-guide/mcp/guides/search_query_guide).
  * `type`: `string`
  * `required`: `no`
  * `default`: `n/a`
* `page`: 1-based page index.
  * `type`: `null|number`
  * `required`: `no`
  * `default`: `1`
* `per_page`: Rows per page.
  * `type`: `null|number`
  * `required`: `no`
  * `default`: `10`
* `search_mode`: Query interpretation mode. See Required Reading: [Search\_Mode\_Guide](https://docs.govtribe.com/user-guide/mcp/guides/search_mode_guide).
  * `type`: `string`
  * `required`: `no`
  * `default`: `keyword`
  * `options`: `keyword`, `semantic`
* `award_date_range`: Filter by the date the award was issued. See Required Reading: [Date\_Filtering\_Guide](https://docs.govtribe.com/user-guide/mcp/guides/date_filtering_guide).
  * `type`: `object`
  * `required`: `no`
  * `default`: `n/a`
  * `shape`: `{ from?: null|string, to?: null|string }`
* `ultimate_completion_date_range`: Filter by the ultimate completion date of the award. See Required Reading: [Date\_Filtering\_Guide](https://docs.govtribe.com/user-guide/mcp/guides/date_filtering_guide).
  * `type`: `object`
  * `required`: `no`
  * `default`: `n/a`
  * `shape`: `{ from?: null|string, to?: null|string }`
* `dollars_obligated_range`: Filter by the amount of dollars obligated in the award.
  * `type`: `object`
  * `required`: `no`
  * `default`: `n/a`
  * `shape`: `{ min?: null|number, max?: null|number }`
* `place_of_performance_ids`: Filter by place of performance. Use GovTribe location IDs or location text for countries, cities/localities, ZIP or postal codes, states/territories, or counties; matching is US-biased for ambiguous names. See Required Reading: [Location\_Filtering\_Guide](https://docs.govtribe.com/user-guide/mcp/guides/location_filtering_guide).
  * `type`: `array<string>`
  * `required`: `no`
  * `default`: `n/a`
* `place_of_performance_ids_operator`: Choose whether to include or exclude values for Place of Performance IDs or Locations.
  * `type`: `null|string`
  * `required`: `no`
  * `default`: `in`
  * `options`: `in`, `not_in`
* `vendor_ids`: Filter by vendors. Use GovTribe IDs or vendor UEIs.
  * `type`: `array<string>`
  * `required`: `no`
  * `default`: `n/a`
* `vendor_ids_operator`: Choose whether to include or exclude values for Vendor IDs (GovTribe or UEI).
  * `type`: `null|string`
  * `required`: `no`
  * `default`: `in`
  * `options`: `in`, `not_in`
* `contracting_federal_agency_ids`: Filter by contracting federal agencies (who signed the contract). Use GovTribe IDs.
  * `type`: `array<string>`
  * `required`: `no`
  * `default`: `n/a`
* `contracting_federal_agency_ids_operator`: Choose whether to include or exclude values for Contracting Federal Agency GovTribe IDs.
  * `type`: `null|string`
  * `required`: `no`
  * `default`: `in`
  * `options`: `in`, `not_in`
* `funding_federal_agency_ids`: Filter by funding federal agencies (who own the money). Use GovTribe IDs.
  * `type`: `array<string>`
  * `required`: `no`
  * `default`: `n/a`
* `funding_federal_agency_ids_operator`: Choose whether to include or exclude values for Funding Federal Agency GovTribe IDs.
  * `type`: `null|string`
  * `required`: `no`
  * `default`: `in`
  * `options`: `in`, `not_in`
* `federal_grant_program_ids`: Filter by federal grant programs. Use GovTribe IDs.
  * `type`: `array<string>`
  * `required`: `no`
  * `default`: `n/a`
* `federal_grant_program_ids_operator`: Choose whether to include or exclude values for Federal Grant Program GovTribe IDs.
  * `type`: `null|string`
  * `required`: `no`
  * `default`: `in`
  * `options`: `in`, `not_in`
* `assistance_types`: Filter by the type of assistance (grant type).
  * `type`: `array<string>`
  * `required`: `no`
  * `default`: `n/a`
  * `options`: `Project Grant`, `Formula Grant`, `Cooperative Agreement`, `Block Grant`
* `assistance_types_operator`: Choose whether to include or exclude values for Assistance Types.
  * `type`: `null|string`
  * `required`: `no`
  * `default`: `in`
  * `options`: `in`, `not_in`
* `similar_filter`: Find similar to the provided govtribe\_type + govtribe\_id.
  * `type`: `null|object`
  * `required`: `no`
  * `default`: `n/a`
  * `shape`: `{ govtribe_type: string, govtribe_id: string }`
* `federal_grant_award_ids`: Include or exclude results by GovTribe IDs.
  * `type`: `array<string>`
  * `required`: `no`
  * `default`: `n/a`
* `federal_grant_award_ids_operator`: Choose whether to include or exclude values for GovTribe IDs.
  * `type`: `null|string`
  * `required`: `no`
  * `default`: `in`
  * `options`: `in`, `not_in`
* `aggregations`: Aggregation keys to compute.
  * `type`: `array<string>`
  * `required`: `no`
  * `default`: `n/a`
  * `options`: `dollars_obligated_stats`, `top_funding_federal_agencies_by_dollars_obligated`, `top_awardees_by_dollars_obligated`, `top_locations_by_dollars_obligated`, `top_federal_grant_programs_by_dollars_obligated`
* `sort`: Sort configuration.
  * `type`: `object`
  * `required`: `no`
  * `default`: `n/a`
  * `shape`: `{ key?: null|string, direction?: null|string }`
  * `options`: `key`: `awardDate`, `completionDate`, `financialStats.dollarsObligated`, `_score`; `direction`: `asc`, `desc`
* `fields_to_return`: Optional field list for row payloads. If omitted and `per_page > 0`, rows default to `govtribe_id`. For `per_page: 0` aggregation/meta calls, this field may be omitted. Specify `fields_to_return` whenever the user asks for fields beyond `govtribe_id`, and prefer omitting it in pure aggregation workflows.
  * `type`: `array<string>`
  * `required`: `no`
  * `default`: `n/a`
  * `options`: `govtribe_id`, `govtribe_ai_summary`, `govtribe_type`, `govtribe_url`, `name`, `description`, `award_date`, `ultimate_completion_date`, `assistance_type`, `dollars_obligated`, `updated_at`, `funding_federal_agency`, `contracting_federal_agency`, `place_of_performance`, `awardee`, `parent_of_awardee`, `federal_grant_program`, `federal_grant_sub_awards`

## Output Contract

* Top-level keys:
  * `data`: Array of result rows when `per_page > 0`.
  * `current_page`, `from`, `to`, `last_page`, `per_page`: pagination fields returned with row results.
  * `total`: Total matched row count for current query filters.
  * `path`: GovTribe search URL for this result set.
  * `contains`: Dataset label for the returned result set.
  * `search_results_id`, `search_results_id_can_generate_saved_search`, `view_search_results_url`: search-session metadata for reuse/saved-search flows.
  * `aggregations`: Aggregation payload keyed by requested aggregation names when requested.
* Row keys:
  * `govtribe_id`
  * `govtribe_ai_summary`
  * `govtribe_type`
  * `govtribe_url`
  * `name`
  * `description`
  * `award_date`
  * `ultimate_completion_date`
  * `assistance_type`
  * `dollars_obligated`
  * `updated_at`
  * `funding_federal_agency`
  * `contracting_federal_agency`
  * `place_of_performance`
  * `awardee`
  * `parent_of_awardee`
  * `federal_grant_program`
  * `federal_grant_sub_awards`
* Relationship retrieval map:
  * `awardee`
    * `resource_type`: `vendor`
    * `tool`: `Search_Vendors`
    * `filter`: `vendor_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `name`, `uei`, `govtribe_url`
  * `contracting_federal_agency`
    * `resource_type`: `federal_agency`
    * `tool`: `Search_Federal_Agencies`
    * `filter`: `federal_agency_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
  * `federal_grant_program`
    * `resource_type`: `federal_grant_program`
    * `tool`: `Search_Federal_Grant_Programs`
    * `filter`: `federal_grant_program_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
  * `federal_grant_sub_awards`
    * `resource_type`: `federal_grant_sub_award`
    * `tool`: `Search_Federal_Grant_Sub_Awards`
    * `filter`: `federal_grant_sub_award_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
  * `funding_federal_agency`
    * `resource_type`: `federal_agency`
    * `tool`: `Search_Federal_Agencies`
    * `filter`: `federal_agency_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
  * `parent_of_awardee`
    * `resource_type`: `vendor`
    * `tool`: `Search_Vendors`
    * `filter`: `vendor_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `name`, `uei`, `govtribe_url`
  * `place_of_performance`
    * `resource_type`: `location`
    * `tool`: `n/a`
    * `filter`: `n/a`
    * `fallback`: No direct Search\_\* tool returns this resource class; use parent dataset filters and parent IDs.
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`

## Usage Patterns

Pattern A: Topic-level grant award discovery with representative rows. Tool: `Search_Federal_Grant_Awards`

```json
{
  "query": "rural broadband deployment planning and implementation",
  "search_mode": "semantic",
  "fields_to_return": [
    "govtribe_id"
  ],
  "sort": {
    "key": "_score",
    "direction": "desc"
  },
  "per_page": 5,
  "page": 1
}
```

Pattern B: Aggregation-only market sizing by recipient, agency, location, and program. Tool: `Search_Federal_Grant_Awards`

```json
{
  "query": "",
  "search_mode": "keyword",
  "aggregations": [
    "dollars_obligated_stats",
    "top_awardees_by_dollars_obligated",
    "top_funding_federal_agencies_by_dollars_obligated",
    "top_locations_by_dollars_obligated",
    "top_federal_grant_programs_by_dollars_obligated"
  ],
  "award_date_range": {
    "from": "2023-01-01",
    "to": "2025-12-31"
  },
  "sort": {
    "key": "financialStats.dollarsObligated",
    "direction": "desc"
  },
  "per_page": 0
}
```

Pattern C: Project-grant-only analysis for a mission topic. Tool: `Search_Federal_Grant_Awards`

```json
{
  "query": "opioid treatment access",
  "search_mode": "semantic",
  "fields_to_return": [
    "govtribe_id"
  ],
  "aggregations": [
    "dollars_obligated_stats",
    "top_awardees_by_dollars_obligated"
  ],
  "assistance_types": [
    "Project Grant"
  ],
  "assistance_types_operator": "in",
  "award_date_range": {
    "from": "2022-01-01",
    "to": null
  },
  "sort": {
    "key": "_score",
    "direction": "desc"
  },
  "per_page": 10
}
```

Pattern D: Known grant award lookup by ID-like token (exact lookup intent). Tool: `Search_Federal_Grant_Awards`

```json
{
  "query": "\"693JJ22430000ZS5EALRR23926\"",
  "search_mode": "keyword",
  "fields_to_return": [
    "govtribe_id"
  ],
  "sort": {
    "key": "_score",
    "direction": "desc"
  },
  "per_page": 1
}
```

Pattern E: Cross-award topic analysis with grants and contracts in parallel. Tool: `Search_Federal_Grant_Awards`

```json
{
  "query": "advanced manufacturing workforce training",
  "search_mode": "semantic",
  "fields_to_return": [
    "govtribe_id"
  ],
  "sort": {
    "key": "_score",
    "direction": "desc"
  },
  "per_page": 5
}
```
