Skip to main content
Glama

Back up project files before editing

statica_bootstrap_guard

Back up existing C/C++ project files before substitution edits so they can be restored later. Call it right before editing hard-coded Makefiles or Vitis CMakeLists.txt.

Instructions

C/C++ only, and only when the substitution edits project files (guide type B: a hard-coded Makefile, Vitis CMakeLists.txt): keep the originals so statica_bootstrap_abort can restore them. Call right before editing. Do NOT call for command-line (A) or IDE/GUI (C) substitution, and never invent a file to satisfy the argument: a guarded file that did not exist is deleted on abort.

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": {
      "projectDir": "<projectDir>",
      "files": "<files>"
    },
    "name": "statica_bootstrap_guard"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesYesExisting project files about to be edited.
projectDirYesAbsolute path of the project directory being analyzed (usually the session's working directory).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), so the description is not the sole source. It adds real value beyond them: the backups exist specifically so statica_bootstrap_abort can restore, and a guarded file that never existed is deleted on abort — a non-obvious side effect worth flagging. It stops short of saying where backups live or what repeated calls do, which is why it is not a 5.

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?

The scoping constraint and the 'call right before editing' trigger are front-loaded, and the abort coupling follows logically. The parenthetical examples ('a hard-coded Makefile, Vitis CMakeLists.txt') are dense but concretely useful; nothing is obviously padded.

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 guard tool, the definition covers trigger, exclusions, expected argument values, side effects on abort, and the relationship to its restore counterpart. The remaining gap is return behavior — what it reports on success or failure — which is not covered and no output schema exists to fill it in.

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 100%, so both parameters are already documented, establishing a baseline of 3. The description goes slightly beyond that by stressing the existence constraint on 'files' and the consequence of fabricating one, which clarifies intent rather than just restating the schema.

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?

The description states a concrete verb and resource ('keep the originals' / back up project files) and immediately scopes it to C/C++ substitution with guide type B. It also names the complementary tool, statica_bootstrap_abort, making it distinguishable from siblings without opening a schema.

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

Usage Guidelines5/5

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

It gives explicit timing ('Call right before editing'), explicit exclusions for substitution types A and C, and an explicit anti-pattern ('never invent a file to satisfy the argument'). The condition selecting this tool versus not calling it is unambiguous.

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