Skip to main content
Glama

Edit or manage a project file

project_edit_file
Destructive

Write, patch, copy, move, or delete a single project file with preview and recoverable backups. Existing files require a SHA-256 hash.

Instructions

Write, exact-patch, copy, move or delete one file. Preview by default. Existing files require expectedSha256; writes/moves/deletes preserve a recoverable backup. General binary writes are refused; use scf_edit for supported SCF scalar inputs and desktop tools for GDF drawing changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path relative to the project/workspace. Absolute paths must remain inside that scope.
editsNoSequential exact text replacements for patch. Each replacement must match exactly occurrences times.
confirmNoApply the described file change when true; otherwise return a preview. This is a tool argument, not a request for another user approval.
contentNoComplete new text for write.
projectNoExisting .acf project path or unambiguous project name. File paths are scoped to its directory.
encodingNoFile encoding; latin1 preserves MAX+plus II legacy bytes. Select utf8 explicitly for Unicode files.
operationNoSingle operation to preview/apply. Defaults to write.
workspaceNoWorkspace directory for resolving project names, or the scope when no project is supplied.
destinationNoNew path inside the scope for copy/move. Existing destinations are refused.
expectedSha256NoSHA-256 from project_read_file or another verified read; mandatory for an existing source file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.3

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, so the safety profile is partly covered; the description still adds material non-annotated behavior: preview-by-default semantics, the mandatory expectedSha256 concurrency guard for existing files, recoverable backups on writes/moves/deletes, and the binary-write refusal. Nothing here contradicts the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the operation set, then the default behavior, then the constraints and sibling routing. No filler and no repetition of the title or schema field text.

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 10-parameter mutation tool with no output schema, the description covers the important preconditions (SHA check, backup, preview) and the escape hatches (scf_edit, desktop tools). The gap is the return surface: with no output schema, the shape of a preview versus an applied result is left implicit, which is the one thing an agent cannot infer elsewhere.

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 description coverage is 100%, so the baseline is 3, but the description adds cross-parameter semantics the schema cannot: preview behavior is governed by confirm (default off), expectedSha256 is mandatory only for existing source files, and backups apply per operation type. It does not, however, add distinctions between write vs patch payloads beyond the schema's own field docs.

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 first sentence names the specific resource (one file) and enumerates the five concrete operations (write, exact-patch, copy, move, delete), so an agent can distinguish it from project_create, project_clone, or project_restore_file. It also explicitly separates itself from scf_edit and the desktop/GDF tools, which is exactly the differentiation a sibling-heavy tool needs.

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?

Gives affirmative conditions (preview by default; existing files need expectedSha256) and negative routing rules: general binary writes are refused, SCF scalar inputs belong in scf_edit, GDF drawing changes belong in desktop tools. This is explicit when-to-use / when-not-to-use / alternative guidance rather than implied context.

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