Skip to main content
Glama
link0-o

PerfLens MCP Server

by link0-o

finalize_docker_optimization_candidate

Idempotent

Finalize an optimization session by retaining a replay-verified candidate or restoring the baseline, then revoke the session and clean verified resources. Explicit authorization is required for unverified candidates.

Instructions

Finalize the source-workspace choice for either one replay-verified Iteration or a stopped Session whose latest candidate could not be evaluated, revoke the bounded optimization Session, and clean only verified session resources. Retaining a non-verified candidate requires a fresh explicit user decision and never creates or upgrades an A/B conclusion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes
dispositionYes
iteration_idNo
authorizationNo
evaluation_reasonNo
candidate_build_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
uriYes
summaryYes
artifact_idYes
artifact_typeYes
schema_versionNo1.0
evidence_qualityNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.2

TDQS

B3.2/5.0
Behavior1/5

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

The description discloses useful behavioral traits: it revokes the session, cleans only verified session resources, and never creates or upgrades an A/B conclusion. However, it says 'clean only verified session resources,' which implies removal or deletion, while the annotations declare destructiveHint=false. That is a direct contradiction with the declared safety profile.

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 compact and information-dense: every phrase adds scope, conditions, side effects, or safety caveats. The first sentence is somewhat overloaded, but it still front-loads the main action and remains clear.

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

Completeness2/5

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

The tool has six parameters, zero schema coverage, and an output schema, but the description does not explain how to map disposition, when to supply iteration_id, or how authorization should be set. It also lacks explicit guidance on alternatives and exclusions, so an agent would still struggle to invoke this tool correctly despite the rich behavioral context.

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

Parameters2/5

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

Schema description coverage is 0%, so the description carries the full burden of explaining the six parameters, but it never names session_id, disposition, iteration_id, authorization, evaluation_reason, or candidate_build_id. It indirectly hints at authorization via 'fresh explicit user decision' and at evaluation_reason via 'could not be evaluated,' but this is insufficient for an agent to reliably construct the arguments.

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 names a specific verb ('Finalize'), a concrete resource ('source-workspace choice'), and the exact triggering conditions ('one replay-verified Iteration' or 'a stopped Session whose latest candidate could not be evaluated'). It also distinguishes its composite behavior from sibling tools like revoke_docker_optimization_session by combining finalization, revocation, and cleanup.

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 explicitly states the two scenarios in which the tool should be used, and warns that retaining a non-verified candidate requires a fresh explicit user decision. It does not name alternative tools or give direct 'do not use when' exclusions, but the usage envelope is clearly bounded.

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