Skip to main content
Glama
Mipiti
by Mipiti

Refine Control

refine_control

Refines a security control's description with an AI sufficiency check, rejecting changes that weaken mapped objectives and flagging assertions that no longer align.

Instructions

Refine a control's description with AI-gated CO sufficiency check.

Two modes:

  • Provide description: proposes a new description directly.

  • Provide codebase_findings: the platform proposes a description based on existing code that may already satisfy the control.

  • Both can be provided: the platform evaluates the proposed description with the codebase findings as context.

The AI evaluates whether the mitigation group still collectively satisfies all mapped control objectives. If rejected, returns {accepted: false, reason, per_co} with per-CO reasoning.

A refinement is rejected when the proposed description would reduce the protection the control currently states for an objective it is mapped to; per_co names each objective and explains why. This is a decision, not a transient error — re-wording the same narrowing will not pass it, and it applies however well-motivated the narrowing is. A control is a requirement that must be met to cover its objectives, so evidence that the system does not currently meet it means the control is UNMET, never that the control should ask for less.

After an accepted refinement the control's assertions are kept and judged again against the new description in the background: an assertion that still fits keeps counting as evidence, and one that no longer fits is flagged as not aligned with the control. Read get_sufficiency once that re-judgement lands, and replace the assertions it names. The refinement itself supersedes nothing; the response's superseded_assertions is always 0.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
model_idYesID of the threat model.
control_idYesID of the control to refine (e.g., "CTRL-03").
descriptionNoProposed new control description (optional if codebase_findings provided).
justificationNoWhy this refinement is appropriate (10 to 2000 characters).
server_versionYes
codebase_findingsNoDescription of existing code that may already satisfy this control's objective (optional). When provided without description, the platform proposes a description.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.77.1
    • changedInput schema / properties / justification / description
      Previous value: -"Why this refinement is appropriate (min 10 chars)."New value: +"Why this refinement is appropriate (10 to 2000\ncharacters)."
  2. First observedv0.57.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the rejection response shape ({accepted, reason, per_co}), the rejection rule (narrowing protection for a mapped objective), that rejection is a decision rather than a transient error that re-wording will not pass, and the background re-judgement of assertions after acceptance including that `superseded_assertions` is always 0.

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 is front-loaded in the first line, then modes, then rejection semantics, then the post-acceptance workflow — a logical progression. It is on the long side and the closing note about `superseded_assertions` being always 0 is somewhat tangential, but nearly every sentence carries operational content.

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 high-complexity, AI-gated mutation tool, the description covers mode selection, the rejection contract, the non-retryable nature of rejection, and the required follow-up call to get_sufficiency. An output schema exists, so return-value enumeration is not needed, and the description still names the rejection payload fields.

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

Parameters4/5

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

Schema coverage is already 83%, so the schema defines most parameters. The description nonetheless adds real meaning beyond it by explaining the interaction between `description` and `codebase_findings` (each alone triggers a different mode; together they combine), which the schema only hints at with 'optional if codebase_findings provided'.

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

Purpose4/5

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

States a specific verb+resource ('Refine a control's description') plus the gating mechanism ('AI-gated CO sufficiency check'), and breaks out the two operating modes by parameter. It is clear what the tool does, though it never names which sibling to use instead (e.g., regenerate_controls, strengthen_controls, remap_control), so differentiation is inferential.

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?

Explicitly tells the agent which parameters select which behavior: provide `description` for a direct proposal, `codebase_findings` for a platform proposal, or both for context-augmented evaluation. It also states the post-acceptance follow-up ('Read get_sufficiency once that re-judgement lands'). It lacks any when-not-to-use guidance relative to sibling tools.

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

Deploy Server

Other Tools