Skip to main content
Glama

Get the next remediation tasks

get_next_remediation_task_set
Read-only

Get open controls from the project's latest scan, with instructions.

customer_asserted=true means a member of your organisation edited the
task's title, category, or instructions. customer_edits lists the fields,
editor, and time.

Actionable work includes required controls and older nice_to_have controls,
which stay open until a scan closes them. A control covered by another is
withheld while its cover is pending. It returns if the customer reopens
it after the covering control completes.

Implement all fixes, commit them, then verify with trigger_analysis.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_next_remediation_task_set"
  }
}

Input Schema

NameRequiredDescriptionDefault
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.
messageNoExactly one sentence written for the user. Never raw exception text or a backend error string, which may expose private details.
scan_idNoThe scan of the approved plan's analysis job. Null when Trent does not name one: a legacy analysis, or a Trent version that does not send it.
controlsNoRemaining actionable controls with implementation instructions, must_implement first, then by priority_rank, lowest first (priority_score, highest first, when no rank is served). customer_asserted=true means a member of your organisation edited this task's title, category or instructions; customer_edits lists which fields, who and when. A control on a ticket carries 'ticket' (key, url, trent_state): name the ticket when you work on the control.
metadataNoCaller metadata, such as 'expiration_warning'. Substantive results have their own fields. Never includes exception or backend error text, which may expose private details.
next_stepsNoRecommended next actions, in order.
controls_fromNoWhich report the control_status values come from: scan_id, and report_is_stale / report_stale_reason when a newer scan exists than that report.
latest_job_idNoThe newer scan's job ID when its plan cannot be read yet.
latest_scan_idNoThe newer scan's id when its plan cannot be read yet.
retry_after_secondsNoWith reason rate_limited, how many seconds Trent asks the caller to wait.
analysis_in_progressNoTrue when a scan other than this plan's is running or queued, so these tasks are from the last complete scan and change when it finishes; say so.
classification_breakdownNoCounts only the approved, not-yet-done controls this reply returns, by classification. Completed and excluded controls, covered controls withheld while their cover is pending, and controls outside the approval are not counted, so it is smaller than review_plan's classification_breakdown.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / controls / description
      Previous value: -"Remaining actionable controls with implementation instructions, must_implement first. customer_asserted=true means a member of your organisation edited this task's title, category or instructions; customer_edits lists which fields, who and when. A control on a ticket carries 'ticket' (key, url, trent_state): name the ticket when you work on the control."New value: +"Remaining actionable controls with implementation instructions, must_implement first, then by priority_rank, lowest first (priority_score, highest first, when no rank is served). customer_asserted=true means a member of your organisation edited this task's title, category or instructions; customer_edits lists which fields, who and when. A control on a ticket carries 'ticket' (key, url, trent_state): name the ticket when you work on the control."
    • 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"
      +}
  2. Changed3 schema fields changed
    • changedOutput schema / $defs / ControlsFrom / properties / report_stale_reason / description
      Previous value: -"Present when report_is_stale is true. scan_in_progress: a newer scan is running. latest_scan_failed: the latest scan did not complete."New value: +"Present when report_is_stale is true. scan_in_progress: a newer scan is running. latest_scan_failed: the latest scan did not complete. requested_scan_failed: the scan asked for failed, so the last good scan's statuses are shown. requested_scan_did_not_produce: the scan asked for produced no plan."
    • addedOutput schema / $defs / ControlsFrom / properties / requested_scan_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "The scan the read asked for, present when it differs from scan_id: another scan's report answered for it. Name both scans when you report the statuses.",
      +  "title": "Requested Scan Id"
      +}
    • changedOutput schema / properties / analysis_in_progress / description
      Previous value: -"True when a newer scan is running or queued, so these tasks are from the last complete scan and change when it finishes; say so."New value: +"True when a scan other than this plan's is running or queued, so these tasks are from the last complete scan and change when it finishes; say so."
  3. Changed6 schema fields changed
    • addedOutput schema / $defs
      Added value: +{
      +  "ControlsFrom": {
      +    "additionalProperties": true,
      +    "properties": {
      +      "report_is_stale": {
      +        "anyOf": [
      +          {
      +            "type": "boolean"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "True when a newer scan exists than that report, so the statuses are from the earlier scan named by scan_id; say so. False when that report is the latest. Null when this tool cannot tell: its read is pinned to one job, and Trent does not judge staleness for a pinned read.",
      +        "title": "Report Is Stale"
      +      },
      +      "report_stale_reason": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Present when report_is_stale is true. scan_in_progress: a newer scan is running. latest_scan_failed: the latest scan did not complete.",
      +        "title": "Report Stale Reason"
      +      },
      +      "scan_id": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "The scan whose report the control statuses come from. Null when the read names none: a legacy scan, or a Trent version that does not send it.",
      +        "title": "Scan Id"
      +      }
      +    },
      +    "title": "ControlsFrom",
      +    "type": "object"
      +  }
      +}
    • addedOutput schema / properties / analysis_in_progress
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "True when a newer scan is running or queued, so these tasks are from the last complete scan and change when it finishes; say so.",
      +  "title": "Analysis In Progress"
      +}
    • changedOutput schema / properties / classification_breakdown / description
      Previous value: -"Counts of returned controls by classification."New value: +"Counts only the approved, not-yet-done controls this reply returns, by classification. Completed and excluded controls, covered controls withheld while their cover is pending, and controls outside the approval are not counted, so it is smaller than review_plan's classification_breakdown."
    • addedOutput schema / properties / controls_from
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/ControlsFrom"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Which report the control_status values come from: scan_id, and report_is_stale / report_stale_reason when a newer scan exists than that report."
      +}
    • addedOutput schema / properties / latest_scan_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "The newer scan's id when its plan cannot be read yet.",
      +  "title": "Latest Scan Id"
      +}
    • addedOutput schema / properties / scan_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "The scan of the approved plan's analysis job. Null when Trent does not name one: a legacy analysis, or a Trent version that does not send it.",
      +  "title": "Scan Id"
      +}
  4. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses meaningful behavior: customer_asserted and customer_edits semantics, which controls are actionable, how nice_to_have controls close, and how covered controls can be withheld and later returned. These details materially help an agent interpret the returned task set.

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

Conciseness5/5

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

The description is front-loaded with the core purpose and then adds compact, high-value clarifications about customer assertions, actionability, coverage withholding, and the follow-up workflow. Each paragraph contributes useful information without redundant restatement.

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?

The tool has complete parameter coverage, read-only annotations, an output schema, and a description that explains the special task-state semantics an agent needs in order to interpret results correctly. No critical context appears to be missing.

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

Parameters3/5

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

Schema coverage is 100%, so project_id and project_name are already fully documented in the input schema, including the either/or requirement. The description adds no further parameter guidance, which is acceptable at this coverage level but does not exceed the baseline.

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?

The description uses a specific verb and resource: 'Get open controls from the project's latest scan, with instructions.' It clearly scopes the result to the latest scan and adds that instructions are included, distinguishing it from broader posture or scan-status siblings.

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

Usage Guidelines4/5

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

The description gives a clear post-use workflow: 'Implement all fixes, commit them, then verify with trigger_analysis.' This tells the agent when the tool fits in the remediation cycle, though it does not explicitly contrast alternatives such as get_scan_status or get_security_posture.

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.