Skip to main content
Glama

preview_resource_edit

Read-only

Test a proposed text replacement before saving, showing the resulting digest and size difference.

Instructions

Preview a text replacement, including the output digest and size delta.

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": {
      "artifact_id": "<artifact_id>",
      "resource_id": "<resource_id>",
      "value": "<value>"
    },
    "name": "preview_resource_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
valueYes
artifact_idYes
resource_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered and the bar is lower. The description usefully adds that the response carries an output digest and size delta, which tells the agent what evidence a preview yields. It does not state whether the preview is scoped to an artifact or a resource, or whether the edit is applied at all.

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 key noun phrase ("text replacement") and the payoff ("output digest and size delta") come early. It is arguably too terse rather than too wordy.

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?

An output schema exists, so return values need not be explained, but the tool has three required parameters at 0% schema coverage and the description leaves the edit semantics ambiguous. For a preview tool whose whole value is telling the agent what an edit would do, that gap is significant.

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% for all three required parameters, so the description must compensate and largely fails to. "value" is loosely implied to be the replacement text, but artifact_id and resource_id are never explained, nor is it clear whether the replacement targets the whole resource or a located substring.

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 and resource ("Preview a text replacement") and even names the shape of the result (output digest and size delta), so the agent knows this is a dry-run of an edit. It does not distinguish itself from siblings such as preview_shortcut_remap, leaving the agent to infer the difference from the name alone.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance: nothing says this should be called before save_resource_copy or any other write tool, nor are there any exclusions or prerequisites. The word "Preview" implies a non-committing check, but that inference is all the agent gets.

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