# Search Contacts

`Search_Contacts` returns GovTribe contact profiles with communication fields, organizational context, and contact-reference signals derived from opportunities, awards, and files.

## When To Use

Typical questions this tool answers well:

* Which GovTribe contacts match a specific person, email fragment, or topical role?
* Which contacts are associated with a known federal agency or vendor?
* Which contacts were referenced from specific opportunities, awards, or files?
* Which contact reference types (opportunity POC, award POC, in-description, in-government-file) are present in a result set?
* Where are contact records concentrated by top agencies, states, jurisdictions, or vendors?

## Required Reading

1. [Search\_Mode\_And\_Query\_Guide](/user-guide/mcp/guides/search_mode_and_query_guide.md): Required before setting free-text query strings and choosing keyword vs semantic retrieval.

## Output Contract

* Top-level keys:
  * `current_page`: Current page number when `per_page > 0`.
  * `data`: Array of result rows when `per_page > 0`.
  * `from`: First row position in the current page.
  * `last_page`: Last page number for current filters.
  * `path`: GovTribe search URL for this result set.
  * `per_page`: Applied page size.
  * `to`: Last row position in the current page.
  * `total`: Total matched row count for current query filters.
  * `contains`: Dataset label for the returned result set.
  * `search_results_id_can_generate_saved_search`: Saved-search eligibility flag.
  * `search_results_id`: Server-side search result identifier.
  * `view_search_results_url`: URL to open this exact result set.
  * `aggregations`: Aggregation payload keyed by requested aggregation names when requested.
  * `per_page: 0` behavior: response omits row pagination keys and returns metadata keys above plus `aggregations` when requested.
* Row keys:
  * `govtribe_id`
  * `govtribe_ai_summary`
  * `govtribe_type`
  * `govtribe_url`
  * `types`
  * `name`
  * `email`
  * `phone`
  * `title`
  * `role`
  * `organization`
  * `updated_at`
  * `parent_organization_details`
* Relationship retrieval map:
  * `parent_organization_details`
    * `resource_type`: `federal_agency`
    * `tool`: `Search_Federal_Agencies`
    * `filter`: `federal_agency_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
    * `resource_type`: `jurisdiction`
    * `tool`: `Search_Jurisdictions`
    * `filter`: `jurisdiction_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
    * `resource_type`: `state`
    * `tool`: `Search_States`
    * `filter`: `state_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
    * `resource_type`: `vendor`
    * `tool`: `Search_Vendors`
    * `filter`: `vendor_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `name`, `uei`, `govtribe_url`

## Usage Patterns

Pattern A: Resolve contacts for a known federal agency (after resolving the agency ID with `Search_Federal_Agencies`). Tool: `Search_Contacts`

```json
{
  "federal_agency_ids": [
    "9700|1700-A"
  ],
  "search_mode": "keyword",
  "fields_to_return": [
    "govtribe_id"
  ],
  "page": 1,
  "per_page": 25
}
```

Pattern B: Find contacts referenced in known records and limit to public POC-type signals. Tool: `Search_Contacts`

```json
{
  "reference_types": [
    "pointOfContact",
    "transactionContact"
  ],
  "referenced_govtribe_ids": [
    "<RECORD_GOVTRIBE_ID>"
  ],
  "search_mode": "keyword",
  "fields_to_return": [
    "govtribe_id"
  ],
  "page": 1,
  "per_page": 20
}
```

Pattern C: Run conceptual contact discovery while excluding known contacts. Tool: `Search_Contacts`

```json
{
  "query": "engineering and cybersecurity acquisition contacts",
  "search_mode": "semantic",
  "fields_to_return": [
    "govtribe_id"
  ],
  "page": 1,
  "per_page": 20,
  "contact_ids": [
    "<CONTACT_ID_TO_EXCLUDE_1>",
    "<CONTACT_ID_TO_EXCLUDE_2>"
  ],
  "contact_ids_operator": "not_in"
}
```

Pattern D: Aggregation-only concentration view by agency, state, jurisdiction, and vendor. Tool: `Search_Contacts`

```json
{
  "aggregations": [
    "top_federal_agencies_by_doc_count",
    "top_states_by_doc_count",
    "top_jurisdictions_by_doc_count",
    "top_vendors_by_doc_count"
  ],
  "search_mode": "keyword",
  "per_page": 0
}
```

Pattern E: Find contacts similar to an existing anchor record. Tool: `Search_Contacts`

```json
{
  "search_mode": "semantic",
  "fields_to_return": [
    "govtribe_id"
  ],
  "similar_filter": {
    "govtribe_type": "contact",
    "govtribe_id": "<CONTACT_ID>"
  },
  "page": 1,
  "per_page": 20
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.govtribe.com/user-guide/mcp/tools/search-contacts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
