> ## Documentation Index
> Fetch the complete documentation index at: https://resq-dependabot-github-actions-github-actions-478e18be3d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Tools

<a id="resq_mcp.hce.tools" />

# resq\_mcp.hce.tools

MCP tool wrappers for HCE domain.

<a id="resq_mcp.hce.tools.logging" />

## logging

<a id="resq_mcp.hce.tools.time" />

## time

<a id="resq_mcp.hce.tools.UTC" />

## UTC

<a id="resq_mcp.hce.tools.datetime" />

## datetime

<a id="resq_mcp.hce.tools.FastMCPError" />

## FastMCPError

<a id="resq_mcp.hce.tools.IncidentValidation" />

## IncidentValidation

<a id="resq_mcp.hce.tools.MissionParameters" />

## MissionParameters

<a id="resq_mcp.hce.tools.MAX_INCIDENTS" />

## MAX\_INCIDENTS

<a id="resq_mcp.hce.tools.MAX_MISSIONS" />

## MAX\_MISSIONS

<a id="resq_mcp.hce.tools.incidents" />

## incidents

<a id="resq_mcp.hce.tools.mcp" />

## mcp

<a id="resq_mcp.hce.tools.missions" />

## missions

<a id="resq_mcp.hce.tools.logger" />

#### logger

<a id="resq_mcp.hce.tools.validate_incident" />

#### validate\_incident

```python theme={null}
@mcp.tool()
async def validate_incident(val: IncidentValidation) -> str
```

Submit validation result for an incident report.

Used by human operators or automated validation systems (HCE) to
confirm or reject incident reports before triggering full response.

**Arguments**:

* `val` - IncidentValidation with:
  * incident\_id: ID of incident being validated
  * is\_confirmed: True=confirmed, False=rejected/false positive
  * validation\_source: Who/what validated (e.g., "Human-Operator")
  * correlated\_pre\_alert\_id: Optional linked PDIE alert
  * notes: Validation reasoning and evidence

**Returns**:

* `str` - Confirmation message indicating action taken:
  "Incident \{id} successfully CONFIRMED." or
  "Incident \{id} successfully REJECTED."

**Example**:

> > > from resq\_mcp.hce.models import IncidentValidation
> > > validation = IncidentValidation(
> > > ...     incident\_id="INC-123",
> > > ...     is\_confirmed=True,
> > > ...     validation\_source="Human-Operator-Alice",
> > > ...     notes="Confirmed via video evidence and ground reports"
> > > ... )
> > > result = await validate\_incident(validation)
> > > print(result)  # "Incident INC-123 successfully CONFIRMED."

Workflow:

1. Edge AI detects incident (low confidence)
2. HCE cross-references with PDIE/sensors
3. If ambiguous -> human review required
4. Operator submits validation via this tool
5. If confirmed -> trigger response strategy
6. If rejected -> log as false positive, update ML model

Audit Trail:
All validations logged with timestamp, source, and reasoning
for post-incident analysis and ML model refinement.

<a id="resq_mcp.hce.tools.update_mission_params" />

#### update\_mission\_params

```python theme={null}
@mcp.tool()
async def update_mission_params(drone_id: str,
                                strategy_id: str,
                                is_urgent: bool = False) -> MissionParameters
```

Push authorized mission parameters to a drone for an approved strategy.

Completes the deployment workflow after a strategy has been approved:
get\_deployment\_strategy -> (human approval) -> update\_mission\_params -> drone executes.

**Arguments**:

* `drone_id` - Target drone identifier (e.g., "DRONE-Alpha").
* `strategy_id` - Approved strategy ID from get\_deployment\_strategy (e.g., "STRAT-X1Y2Z3").
* `is_urgent` - If True, sets risk\_tolerance=0.9 (aggressive routing) instead of the
  default 0.5. Must be explicitly set — urgency is never derived from the
  strategy\_id string to prevent injection attacks.

**Returns**:

* `MissionParameters` - Authorized parameter set including mission ID, allowed actions,
  risk tolerance, and a deterministic blockchain-anchored strategy hash.

**Raises**:

* `FastMCPError` - If the drone already has an active mission for a different strategy
  (conflict guard), or if the mission store is at capacity.

**Example**:

> > > params = await update\_mission\_params("DRONE-Alpha", "STRAT-ABCD1234", is\_urgent=True)
> > > print(params.authorized\_actions)
> > > print(params.strategy\_hash)  # 0xSHA256(strategy\_id:mission\_id)
