Skip to main content
Glama

Approve the remediation plan

approve_plan
Idempotent

Record approval of the latest analysis's remediation plan, then return the approved plan with its implementation instructions.

Trent already approves each plan when it is first read, so the work does
not wait on this call; Trent plugins up to version 0.2.0 needed it. Call it
when the user asks to approve the plan; it records a new approval each
time. To read the plan, use review_plan. To get the next work with
instructions, use get_next_remediation_task_set.

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": "approve_plan"
  }
}

Input Schema

NameRequiredDescriptionDefault
project_idNoProject ID (provide either project_id or project_name)
project_nameNoProject name (provide either project_id or project_name)
analysis_job_idNoAnalysis job id whose approval to return. Defaults to the latest completed analysis.

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 analysis job. Null when Trent does not name one: a legacy analysis, or a Trent version that does not send it.
controlsNoApproved controls with approved instructions, including any edits the customer made since, sorted must_implement first. A control on a ticket carries 'ticket' (key, url, trent_state).
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.
approval_idNoApproval identifier for the approved plan.
approved_atNoTimestamp when the plan was approved.
approved_byNoActor who approved the plan.
analysis_job_idNoAnalysis job identifier tied to the approval.
retry_after_secondsNoWith reason rate_limited, how many seconds Trent asks the caller to wait.
classification_breakdownNoCounts of controls by classification.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. Changed1 schema field changed
    • addedOutput schema / properties / scan_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "The scan of the approved analysis job. Null when Trent does not name one: a legacy analysis, or a Trent version that does not send it.",
      +  "title": "Scan Id"
      +}
  3. First observed

TDQS

A3.7/5.0
Behavior1/5

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

The annotations declare idempotentHint=true, but the description says 'it records a new approval each time,' which implies repeated calls create additional approval records and therefore additional side effects. This directly contradicts the idempotency annotation, so per the rubric it scores 1 despite otherwise useful legacy and workflow context.

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?

The description is front-loaded with the core action and return behavior, followed by usage guidance and alternatives. The legacy-plugin note is relevant but slightly verbose; overall it is efficient and well structured.

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

Completeness4/5

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

An output schema exists, so the description need not explain return values in detail, and annotations cover most safety traits. The description adds useful workflow context about legacy behavior and sibling alternatives, though the idempotency contradiction keeps it from being fully complete and reliable.

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 description coverage is 100%, so all three parameters are already documented in the input schema. The description does not add syntax or selection details beyond the schema, so the baseline score of 3 is appropriate.

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: 'Record approval of the latest analysis's remediation plan' and says it returns the approved plan with implementation instructions. It also distinguishes this tool from review_plan and get_next_remediation_task_set, so an agent can identify its role immediately.

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?

It explicitly states when to call it ('when the user asks to approve the plan') and names alternatives for adjacent tasks: review_plan for reading the plan and get_next_remediation_task_set for next work. It also clarifies that the work does not wait on this call, which helps an agent decide whether the call is needed.

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.