# Update Pursuit

`Update_Pursuit` updates an existing GovTribe pursuit and returns the updated pursuit resource as JSON text.

## Input Contract

* `pursuit_id`: GovTribe ID of the pursuit to update.
  * `type`: `string`
  * `required`: `yes`
  * `default`: `n/a`
* `stage_id`: GovTribe ID of the destination stage.
  * `type`: `string`
  * `required`: `no`
  * `default`: `omit to keep current stage`
  * `shape`: `must reference an existing stage ID`
* `name`: Updated pursuit name.
  * `type`: `string`
  * `required`: `no`
  * `default`: `omit to keep current name`
  * `shape`: `min length 1, max length 255`
* `description`: Updated pursuit description text.
  * `type`: `string`
  * `required`: `no`
  * `default`: `omit to keep current description`
* `pwin`: Updated win-probability percentage.
  * `type`: `integer`
  * `required`: `no`
  * `default`: `omit to keep current pwin`
  * `shape`: `min 0, max 100`
* `estimatedValue`: Updated estimated value.
  * `type`: `integer`
  * `required`: `no`
  * `default`: `omit to keep current estimated value`
  * `shape`: `min 0`
* `estimatedDuration`: Updated estimated duration (months).
  * `type`: `integer`
  * `required`: `no`
  * `default`: `omit to keep current estimated duration`
  * `shape`: `min 0`
* `estimatedAwardDate`: Updated expected award date.
  * `type`: `string`
  * `required`: `no`
  * `default`: `omit to keep current estimated award date`
  * `shape`: `YYYY-MM-DD or ISO 8601`
* `dueDate`: Updated response due date.
  * `type`: `string`
  * `required`: `no`
  * `default`: `omit to keep current due date`
  * `shape`: `YYYY-MM-DD or ISO 8601`

## Output Contract

* Top-level keys:
  * `govtribe_id`
  * `govtribe_ai_summary`
  * `govtribe_type`
  * `govtribe_url`
  * `name`
  * `description`
  * `due_date`
  * `created_at`
  * `estimated_award_date`
  * `estimated_duration`
  * `set_aside`
  * `estimated_value`
  * `updated_at`
  * `owner`
  * `stage`
  * `pipeline`
  * `user_files`
  * `federal_agency`
  * `naics_category`
  * `psc_category`
  * `state`
  * `associated_records`
  * `contacts`
* Row keys:
  * `n/a`
* Relationship retrieval map:
  * `associated_records`
    * `resource_type`: `federal_contract_award`
    * `tool`: `Search_Federal_Contract_Awards`
    * `filter`: `contact_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
    * `resource_type`: `federal_contract_idv`
    * `tool`: `Search_Federal_Contract_IDVs`
    * `filter`: `contact_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
    * `resource_type`: `federal_contract_opportunity`
    * `tool`: `Search_Federal_Contract_Opportunities`
    * `filter`: `contact_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
    * `resource_type`: `federal_forecast`
    * `tool`: `Search_Federal_Forecasts`
    * `filter`: `contact_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
    * `resource_type`: `federal_grant_award`
    * `tool`: `Search_Federal_Grant_Awards`
    * `filter`: `contracting_federal_agency_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
    * `resource_type`: `federal_grant_opportunity`
    * `tool`: `Search_Federal_Grant_Opportunities`
    * `filter`: `contact_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
    * `resource_type`: `nigp_category`
    * `tool`: `Search_Nigp_Categories`
    * `filter`: `nigp_category_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
    * `resource_type`: `state_local_contract_award`
    * `tool`: `Search_State_And_Local_Contract_Awards`
    * `filter`: `contact_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
    * `resource_type`: `state_local_contract_idv`
    * `tool`: `Search_State_And_Local_Contract_IDVs`
    * `filter`: `contact_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
    * `resource_type`: `state_local_contract_opportunity`
    * `tool`: `Search_State_And_Local_Contract_Opportunities`
    * `filter`: `contact_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
    * `resource_type`: `state_local_contract_vehicle`
    * `tool`: `Search_State_And_Local_Contract_Vehicles`
    * `filter`: `contact_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
    * `resource_type`: `unspsc_category`
    * `tool`: `Search_Unspsc_Categories`
    * `filter`: `unspsc_category_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
  * `contacts`
    * `resource_type`: `contact`
    * `tool`: `Search_Contacts`
    * `filter`: `contact_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `name`, `email`, `govtribe_url`
  * `federal_agency`
    * `resource_type`: `federal_agency`
    * `tool`: `Search_Federal_Agencies`
    * `filter`: `federal_agency_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
  * `naics_category`
    * `resource_type`: `naics_category`
    * `tool`: `Search_Naics_Categories`
    * `filter`: `naics_category_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
  * `owner`
    * `resource_type`: `user`
    * `tool`: `Search_Users`
    * `filter`: `user_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `name`, `email`
  * `pipeline`
    * `resource_type`: `pipeline`
    * `tool`: `Search_Pipelines`
    * `filter`: `creator_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
  * `psc_category`
    * `resource_type`: `psc_category`
    * `tool`: `Search_Psc_Categories`
    * `filter`: `psc_category_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
  * `stage`
    * `resource_type`: `stage`
    * `tool`: `Search_Stages`
    * `filter`: `creator_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`, `type`
  * `state`
    * `resource_type`: `state`
    * `tool`: `Search_States`
    * `filter`: `state_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`
  * `user_files`
    * `resource_type`: `user_file`
    * `tool`: `Search_User_Files`
    * `filter`: `user_file_ids`
    * `nested_keys`: `govtribe_id`, `govtribe_type`, `govtribe_url`, `name`

## Usage Patterns

Pattern A: Update core forecasting fields while keeping current stage placement. Tool: `Update_Pursuit`

```json
{
  "pursuit_id": "<PURSUIT_ID>",
  "pwin": 60,
  "estimatedValue": 3500000,
  "estimatedDuration": 24,
  "estimatedAwardDate": "2026-11-15"
}
```

Pattern B: Move a pursuit into a new stage after bid/no-bid review. Tool: `Update_Pursuit`

```json
{
  "pursuit_id": "<PURSUIT_ID>",
  "stage_id": "<DESTINATION_STAGE_ID>"
}
```
