Skip to main content
Glama

Record feedback on a scan

record_feedback

Record 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. A target naming a requirement that is not in the
project's current list is refused with reason unknown_target.

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

NameRequiredDescriptionDefault
targetNoThe security requirement the feedback is about, as {object_type: 'requirement', object_id: 'SR-4'}. Set it only when the user names that requirement. Feedback that names a requirement can change that requirement even where the user edited it; other feedback only proposes a change there.
contentYesThe user's feedback in their own words from their current message.
stage_idNoThe 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_idNoProject ID (provide either project_id or project_name)
project_nameNoProject name (provide either project_id or project_name)

Output Schema

NameRequiredDescriptionDefault
errorNoTrue 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.
reasonNoA stable snake_case code from the allowed set. Present on every error and on successful calls that carry a workflow state.
statusNoLifecycle status of the feedback row.
targetNoThe security requirement the feedback names, if any.
item_idNoLasting identifier of the item. It stays the same across corrections.
messageNoExactly one sentence written for the user. Never raw exception text or a backend error string, which may expose private details.
scan_idNoThe scan the server attached the feedback to.
versionNoVersion of the item this call wrote. A new item is version 1.
metadataNoCaller metadata, such as 'expiration_warning'. Substantive results have their own fields. Never includes exception or backend error text, which may expose private details.
stage_idNoThe analysis stage the feedback was recorded against.
next_stepsNoRecommended next actions, in order.
feedback_idNoIdentifier of the recorded feedback.
attached_to_scanNoFalse 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_secondsNoWith reason rate_limited, how many seconds Trent asks the caller to wait.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / $defs
      Added value: +{
      +  "FeedbackTarget": {
      +    "properties": {
      +      "object_id": {
      +        "description": "The security requirement's id, such as 'SR-4'.",
      +        "title": "Object Id",
      +        "type": "string"
      +      },
      +      "object_type": {
      +        "const": "requirement",
      +        "description": "What the feedback is about. Only 'requirement' is supported.",
      +        "title": "Object Type",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "object_type",
      +      "object_id"
      +    ],
      +    "title": "FeedbackTarget",
      +    "type": "object"
      +  }
      +}
    • addedInput schema / properties / target
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/FeedbackTarget"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "The security requirement the feedback is about, as {object_type: 'requirement', object_id: 'SR-4'}. Set it only when the user names that requirement. Feedback that names a requirement can change that requirement even where the user edited it; other feedback only proposes a change there."
      +}
    • addedOutput schema / $defs
      Added value: +{
      +  "RecordedFeedbackTarget": {
      +    "additionalProperties": true,
      +    "properties": {
      +      "object_id": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The id it names, such as 'SR-4'.",
      +        "title": "Object Id"
      +      },
      +      "object_type": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "What the feedback names.",
      +        "title": "Object Type"
      +      }
      +    },
      +    "title": "RecordedFeedbackTarget",
      +    "type": "object"
      +  }
      +}
    • addedOutput schema / properties / target
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/RecordedFeedbackTarget"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "The security requirement the feedback names, if any."
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / stage_id / description
      Previous value: -"Which analysis stage the feedback is about: 'understand' (what the system is), 'plan' (what to require) or 'secure' (findings and fixes). Omit it and the server uses the stage the scan is on."New value: +"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."
  3. Changed1 schema field changed
    • addedOutput schema / properties / retry_after_seconds
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "With reason rate_limited, how many seconds Trent asks the caller to wait.",
      +  "title": "Retry After Seconds"
      +}
  4. First observed

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare the write/non-idempotent/non-destructive profile; the description adds real operational behavior beyond that: duplicates are created if a missing listing is re-recorded (reinforcing idempotentHint=false), calls are refused without project_id/project_name, unknown requirement targets are refused with reason 'unknown_target', and attached_to_scan should be inspected. That is exactly the refusal and side-effect context an agent needs on a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and the edit_analysis contrast are front-loaded, and most sentences carry rules an agent would otherwise get wrong. It is on the long side and partly redundant — the 'do not record twice' warning is restated with its consequence, and the item-splitting rules span several sentences that could be compressed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter mutation tool with an output schema and multiple sibling surfaces, the definition covers the whole calling decision: when to use, how to split multi-claim messages, what to say to the user about splitting and scan attachment, and the exact refusal modes. Nothing an agent needs in order to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline would be 3; the description earns more by adding runtime semantics the schema cannot express — that 'stage_id' must always be passed or the item lands on the current scan stage, that a 'target' on a named requirement can change it even when user-edited, and that project_id/project_name are jointly mandatory with refusal otherwise.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource ('Record the user's feedback on a scan') and immediately explains the resource's role ('The scan reads it while it runs'). It then names the exact sibling it is not — 'Use edit_analysis for a mechanical correction to one field of one finding' — so an agent can route correctly without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit positive conditions (feedback supplying intent, deployment facts, accepted risks), an explicit negative/alternative ('edit_analysis for a mechanical correction'), and prohibitions ('Do not reconstruct feedback from earlier turns', 'Do not record feedback twice'). It even resolves the granularity question — one item per claim, each with its own stage_id, consequences are separate claims, risk acceptance goes to 'secure'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.