Skip to main content
Glama

preview_graft_patch

Preview a unified diff for integrating a synthesized Chameleon graft into a host file, with non-destructive deduplication of inlined shims.

Instructions

Generates a unified diff patch preview for integrating a synthesized Chameleon graft into a host workspace file with non-destructive deduplication of inlined shims.

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": {
      "graftId": "<graftId>"
    },
    "name": "preview_graft_patch"
  }
}

Input Schema

NameRequiredDescriptionDefault
graftIdYesID of the synthesized Chameleon graft.
targetFilePathNoDestination relative path in host workspace.
targetFileContentNoExisting content of target file (if any) to diff against.
integrationStrategyNoSplicing strategy (append to end, prepend to top, or smart-replace matching primary symbol).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose useful traits: the output is a unified diff, the operation is non-destructive, and inlined shims are deduplicated. However, it does not clarify whether any file is written, what happens if the graft ID is invalid, or the mechanics of deduplication, leaving meaningful behavioral gaps for a mutation-adjacent tool.

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 with no filler; the core action and its qualifier come first. It is jargon-dense but every clause carries information, so nothing is wasted.

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?

The description defines the return artifact (a unified diff) which compensates somewhat for the absent output schema, and the input schema is fully documented. Still, with no annotations and no output schema, an agent lacks clarity on side effects, error conditions, and the deduplication behavior's implications.

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%, including an enum for integrationStrategy, so the schema already documents all four parameters. The description adds no parameter-level detail beyond what the schema provides, making the baseline 3 appropriate.

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 ('Generates a unified diff patch preview') and a precise resource ('integrating a synthesized Chameleon graft into a host workspace file'), plus a distinctive behavioral qualifier ('non-destructive deduplication of inlined shims'). This clearly distinguishes it from siblings like synthesize_chameleon_graft, though it never names an alternative explicitly.

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?

Usage is only implied by the word 'preview' and the reference to a 'synthesized' graft (suggesting it follows synthesis). There is no explicit when-to-use, when-not-to-use, or named alternative such as whether to call this before applying a real integration.

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