Skip to main content
Glama
ltp3-mcp

ltp3-mcp

by RomeoCoding

preview_changes

Show a unified diff of the in-memory tree against the opened or last saved file to see exactly what saving would change, including added, removed, and modified line counts.

Instructions

Show a unified diff of the in-memory tree against the file as opened (or as last saved), so you can see exactly what save_tree would change. stats counts added, removed and modified lines; dirty is false when nothing differs. The diff is cut after max_lines lines.

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": {
      "tree_id": "<tree_id>"
    },
    "name": "preview_changes"
  }
}

Input Schema

NameRequiredDescriptionDefault
tree_idYes
max_linesNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses the comparison baseline, the meaning of the `stats` counters, the `dirty` flag semantics, and truncation behavior at `max_lines`. The main gap is that it never explicitly states the call is non-mutating and leaves error conditions (e.g., an unopened tree) unaddressed.

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?

Three tight sentences with the core action and its relation to save_tree front-loaded; nothing is padded. The middle sentence explaining `stats` and `dirty` partly restates what an output schema already covers, which is the only minor inefficiency.

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 two-parameter tool with no annotations but an existing output schema, the description covers the behavioral core: baseline, truncation, and flag semantics. What is missing is any statement of read-only safety and the meaning of the required `tree_id`, both of which the agent must infer.

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 0%, so the description must compensate. It explains `max_lines` precisely (the diff is cut after that many lines), which is genuine added meaning, but `tree_id` — the only required parameter — receives no explanation at all, leaving half the parameters undocumented.

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 ('Show a unified diff of the in-memory tree against the file as opened') and anchors it to the sibling it feeds into ('what save_tree would change'). An agent can distinguish this read-only preview from save_tree or compare_trees without opening the schema.

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

Usage Guidelines4/5

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

Usage context is clear: this is the step you call to inspect pending changes before invoking save_tree, and the 'as opened (or as last saved)' baseline tells the agent what is being compared. It stops short of explicit when-not-to-use guidance or an explicit alternative for comparing two trees, so it is not a 5.

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