Skip to main content
Glama

替换原图

apply_compression
Destructive

Replace original images with the compressed results from a prepared plan, but only after the user reviews the preview and explicitly approves; optionally back up originals first.

Instructions

用 prepare_compression 的结果替换原图。只能在用户看过预览表并明确同意后调用。

Input Schema

NameRequiredDescriptionDefault
backupNo替换前把原图备份到同目录的 .image-backup/
plan_idYesprepare_compression 返回的 plan_id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, so the description does not need to argue that this mutates state. It still adds real value by disclosing the human-in-the-loop consent requirement, which annotations cannot express. It stops short of stating that the replacement is irreversible or what happens if backup is left at its default false, which would complete the picture.

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?

Two short sentences: the action first, the safety gate second. Nothing is padded and no sentence restates the tool name or annotations.

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?

For a destructive, two-parameter mutation tool, the description covers the action, the upstream dependency, and the consent gate, with annotations handling the destruction signal. A note on irreversibility or on the consequence of the default backup=false would make it fully self-sufficient.

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%, with backup's default false and backup directory documented inline and plan_id tied to prepare_compression's return value. The description only echoes the plan_id provenance already stated in the schema, so the baseline 3 applies.

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?

States a specific verb and resource ('用 prepare_compression 的结果替换原图' — replace the original image with the prepare_compression result), which is unambiguous and clearly distinct from prepare_compression (plans) and cancel_compression (aborts). The downstream artifact of the sibling tool is named directly, so the agent can place this in the workflow without opening any 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 an explicit gating precondition rather than a vague hint: call only after the user has seen the preview table and explicitly consented. This is effectively both a when-to-use and a when-not-to-use rule, and it ties the tool to the prepare_compression workflow, leaving no doubt about sequencing among the siblings.

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