---
name: operate-sonar-recon
description: Select and run one bounded AI-category Sonar scan, monitor it safely, and inspect the refreshed inventory.
category: pull
---

# Operate bounded Sonar recon

Use Sonar recon only when the accepted task needs fresher or missing inventory. Starting a scan is
consequential network activity; do not start one merely because the tool is available. Import,
cancellation, deletion, worker management, and asset write-back remain separate capabilities. If
this profile does not expose one of them, report the denied capability instead of seeking a legacy
mutation.

## Select a bounded scan

1. Inspect the target's existing inventory first.
2. Call `list_workflows` with `category: "AI"`, then call `get_workflow` on the candidate. Run only
   a workflow whose returned category is exactly `AI`.
3. Resolve the accepted target to one program UUID. An absent or ambiguous program means clarify
   or reject; never omit the target parameters or run match-all.

The launch command has two required values:

- `workflowDefinitionId` — the workflow ID returned by `list_workflows` / `get_workflow`.
- `parameters` — `{ "program": "<program UUID>" }`.

Sonar resolves the workflow version, materialises tasks, and derives target assets from the
parameters. Do not add client-generated IDs, hashes, target manifests, concurrency limits,
timeouts, routing tags, or result-schema metadata.

## Launch and monitor

1. Call `create_scan` exactly once with `workflowDefinitionId` and bounded `parameters`.
2. If the call times out or its outcome is uncertain, do not retry. Tell the operator that the
   launch may have succeeded and needs manual verification; an automatic retry can duplicate work.
3. On a confirmed response, poll `get_scan` and `get_scan_tasks_statistics` until the scan reaches a
   terminal state. A receipt, running status, or completed status alone is not a vulnerability
   conclusion.
4. After completion, query the refreshed inventory with `get_target_overview` and the relevant
   `list_*` asset tools. Attribute only evidence that the returned inventory actually contains.

`list_scan_results` serves compatible existing recon scans. Its frozen revision/cursor contract is
not the result path for a simple scan launched by this tool, so do not use an empty or incompatible
response to conclude that the target is unaffected.

## Failure and runbook guidance

- **Ambiguous or absent program:** return `ClarificationNeeded`; show the missing boundary and do
  not run match-all.
- **Non-AI workflow:** reject it and select a workflow whose category is exactly `AI`.
- **Uncertain launch:** do not retry; escalate for manual verification.
- **Policy rejection:** preserve stable validation errors, revise or narrow, and validate again.
- **Partial failure:** report completed evidence separately from errored or missing work; do not
  summarize the target as clean.
- **Denied capability:** record that the requested action was denied and route import or
  cancellation to an authorized operator.

Never claim a target was checked from a receipt, scan status, task count, or empty result page.
