Skip to main content
Glama
ltp3-mcp

ltp3-mcp

by RomeoCoding

save_tree

Validate and write a power-tree to a .ltp3 file atomically, refusing invalid trees and preventing accidental overwrites with optional backups.

Instructions

Validate and write the tree to a .ltp3 file. Refuses (VALIDATION_FAILED) when validation finds errors and writes nothing. By default it writes a NEW file: path, or '_edited.ltp3' beside the opened file (in the working directory for templates and new trees). An existing target fails with FILE_EXISTS unless overwrite=true, which first keeps a '.bak-' copy; overwriting the file this tree was opened from also fails with STALE_FILE if it changed on disk since it was opened. Writes are atomic, restricted to the allowed directories (LTP3_ALLOWED_DIRS, default: the server's working directory), refused inside the installed program folders, and only .ltp3 is accepted. Returns the path, size, SHA-256, backup path and the validation report.

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": "save_tree"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNo
tree_idYes
overwriteNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/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 so thoroughly: refusal semantics (VALIDATION_FAILED writes nothing), error codes (FILE_EXISTS, STALE_FILE), backup retention before overwrite, atomicity, allowed-directory sandboxing, program-folder exclusion, and extension restriction.

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?

Front-loaded with the core action, then layered conditions in a logical order. Dense but nearly every clause is functional; the long compound sentences around path resolution and overwrite/STALE_FILE interaction read slightly run-on.

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

Completeness5/5

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

Covers everything needed to call it safely: preconditions, default target path, overwrite behavior, sandbox restrictions, and failure modes. It even names the returned fields (path, size, SHA-256, backup path, validation report), which is redundant against the output schema but harmless.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate, and it does for the two non-obvious parameters: `path` is explained including the default '<opened name>_edited.ltp3' placement, and `overwrite` is explained including the '.bak-<timestamp>' copy it triggers. `tree_id` is left to context, which is a minor gap.

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 — 'Validate and write the tree to a .ltp3 file' — plus the output format and the fact that validation gates the write. An agent can immediately tell this is the persist/save operation rather than a validation-only or export-only tool.

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?

Gives clear decision context: default behavior creates a NEW file, an existing target requires overwrite=true, and the opened source file cannot be silently clobbered when it changed on disk. It does not explicitly route the agent to alternatives (e.g. call validate first, or export_json), so it stops short of full when/when-not guidance.

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