Skip to main content
Glama

获取影子副本红绿 Diff

app_get_diff

Computes and fetches complete file changes and a red-green unified diff for a specified shadow copy on demand, so users can review edits before applying or undoing changes.

Instructions

UI 专用:按需计算并拉取指定影子副本的完整文件变更与红绿 Unified Diff。

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_get_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
shadowIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden, and it delivers little beyond the bare action. '按需计算' hints that the diff is recomputed at call time (potentially expensive for large shadow copies), but there is no statement about cost, size limits, permissions, or whether the result is cached — all of which matter for a read of this shape.

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 front-loaded sentence that opens with the scoping qualifier 'UI 专用' and then states the action and payload. No filler, though the terseness is closer to under-specification than to economy.

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

Completeness3/5

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

With no output schema, the description does useful work by naming the two return components (file changes and red/green unified diff). Given no annotations and an undocumented parameter, though, the definition leaves an agent without the cost, permission, or shadowId-provenance information needed to call this confidently.

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?

Only one parameter (shadowId) and schema coverage is 0%, so the schema adds nothing; the description at least ties it to '指定影子副本' (the designated shadow copy). It does not say what form a shadowId takes or where the agent obtains one (presumably from an apply-shadow result), leaving a real gap.

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 pair ('按需计算并拉取' — compute on demand and return) plus a specific resource ('指定影子副本的完整文件变更与红绿 Unified Diff'), so the agent knows this returns both a file-change list and a unified diff. It is clear without needing to be distinguished from siblings, since none of the listed siblings overlap on returning diffs.

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?

'UI 专用' (UI-only) is a real audience hint and '按需' (on demand) implies the agent should call it only when a diff is immediately needed rather than caching. But there is no explicit when-to-use vs when-not guidance and no named alternative or precondition (e.g. that a shadow must exist and be in a reviewable state).

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