Skip to main content
Glama

应用影子副本到原目录

app_apply_shadow

Applies reviewed shadow-copy changes to the original project directory after conflict checks and automatic backups of affected files.

Instructions

UI 专用:冲突预检 → 自动快照备份原文件 → 应用改动到原工程目录。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "shadowId": "<shadowId>"
    },
    "name": "app_apply_shadow"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNo
shadowIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full behavioral burden, and it does disclose two non-obvious traits: a conflict pre-check stage and an automatic snapshot backup of the original files before writing. It stops short of saying what happens on conflict failure, whether the backup is addressable for rollback, or whether the operation requires specific permissions.

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?

A single arrow-delimited line that front-loads the UI restriction and then the execution sequence; every clause carries information. It is terse to the point that the unexplained 'force' parameter is left out entirely, but there is no filler.

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?

This is a mutating tool with no annotations, no output schema, and 0% parameter documentation, so the description must shoulder everything. It covers the internal workflow well but omits the 'force' flag's effect, failure/conflict outcomes, and any indication of what is returned — gaps that matter for a write operation against a real project directory.

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% across two parameters. 'shadowId' is at least implied by the name and the description's reference to a shadow copy, but 'force' is entirely unexplained in both schema and description — an agent cannot tell whether it bypasses the conflict pre-check or overrides the backup. At 0% coverage the description should have compensated and does not.

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?

The description names a specific verb and resource — applying the shadow copy's changes into the original project directory — and the title reinforces it. It is distinguishable from app_discard_shadow by the word 应用 (apply) versus discard, but the description never names the sibling to sharpen the contrast.

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

Usage Guidelines3/5

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

The 'UI 专用' (UI-only) prefix is a meaningful usage constraint, hinting that this path is driven from the interface rather than ad-hoc agent calls. However, there is no explicit statement of when to choose this over app_discard_shadow, app_get_diff, or app_undo_last_apply, and no prerequisites are given.

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