Record feedback on a scan
record_feedbackRecord the user's feedback on a scan. The scan reads it while it runs.
Trent reasons from code, sites, and documents. Feedback supplies intent,
deployment facts, and accepted risks that those sources cannot show:
"that host is internal", "we accept that risk", or "this finding misreads
our auth flow". Use this for feedback that needs reasoning. Use
edit_analysis for a mechanical correction to one field of one finding.
Record the feedback the user expresses in their current message, in
their own words. A correction in passing counts as a request to record it.
Do not reconstruct feedback from earlier turns, infer or embellish it,
or resubmit it on your own initiative; that can invent the user's intent.
Do not record feedback twice, even if an earlier item is missing from a
listing; recording it again creates a duplicate.
Each item is acted on by one stage, so record one item per claim, each
with its own stage_id. Do not add items for effects the user did not
state: "we added Redis as a cache" is one item at understand. A
consequence the user states ("so F-12 should be Low") is its own claim.
One fact that explains several findings is one item at understand that
names them; accepting a risk is one item at secure. Repeat a shared reason
in each item so each stands alone. Tell the user how you split their
message, listing only the items that recorded.
Name the project with project_id or project_name; with neither, the call
is refused. Check attached_to_scan. When false, say the feedback is stored
without a scan to read it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"content": "<content>"
},
"name": "record_feedback"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | The user's feedback in their own words from their current message. | |
| stage_id | No | The earliest analysis stage that owns what the feedback is about: 'understand' (components, data flows, trust boundaries, assets, diagrams, deployment and exposure facts), 'plan' (security requirements) or 'secure' (findings, severity, attack chains, controls, fixes, accepted risks). Always pass it: if omitted, the item goes to whatever stage the scan is on, which may not be the stage that owns it. | |
| project_id | No | Project ID (provide either project_id or project_name) | |
| project_name | No | Project name (provide either project_id or project_name) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | True when the call itself failed. False for successful calls, including a scan still running, an already approved plan, or a repository classified as non-agentic. The reason field describes these workflow states. | |
| reason | No | A stable snake_case code from the allowed set. Present on every error and on successful calls that carry a workflow state. | |
| status | No | Lifecycle status of the feedback row. | |
| item_id | No | Lasting identifier of the item. It stays the same across corrections. | |
| message | No | Exactly one sentence written for the user. Never raw exception text or a backend error string, which may expose private details. | |
| scan_id | No | The scan the server attached the feedback to. | |
| version | No | Version of the item this call wrote. A new item is version 1. | |
| metadata | No | Caller metadata, such as 'expiration_warning'. Substantive results have their own fields. Never includes exception or backend error text, which may expose private details. | |
| stage_id | No | The analysis stage the feedback was recorded against. | |
| next_steps | No | Recommended next actions, in order. | |
| feedback_id | No | Identifier of the recorded feedback. | |
| attached_to_scan | No | False means the feedback is stored without a scan to read it. Say that it is stored but will not be used by a scan. | |
| retry_after_seconds | No | With reason rate_limited, how many seconds Trent asks the caller to wait. |