Skip to main content
Glama

Update the connected editor

crabrix_apply_changes
Destructive

Atomically applies file changes at the exact expected revision; conflicts leave files unchanged, so reread and revise before retrying.

Instructions

Atomically apply file changes to the exact expected revision. text=null deletes a file. edition sets the Rust edition; changes may be empty when entryFile, name or edition changes. A conflict changes nothing: read again and revise. Changes appear live in connected Crabrix/browser editors. In a format 2 room an existing path writes that file, a new path creates one and text=null moves it to recovery; rename, move or restore with crabrix_plan_changes. This never runs code, saves an account copy or pushes Git.

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": {
      "expectedRevision": "<expectedRevision>",
      "changes": "<changes>"
    },
    "name": "crabrix_apply_changes"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNo
changesYes
editionNo
entryFileNo
expectedRevisionYes

Output Schema

NameRequiredDescriptionDefault
changedYes
revisionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.0
    • changedInput schema / properties / expectedRevision / pattern
      Previous value: -"^[a-f0-9]{64}$"New value: +"^(?:[a-f0-9]{32}|[a-f0-9]{64})$"
  2. Changed3 schema fields changedv0.3.5
    • removedInput schema / properties / changes / minItems
      Removed value: -1
    • addedInput schema / properties / edition
      Added value: +{
      +  "enum": [
      +    "2021",
      +    "2024"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "properties": {
      +    "changed": {
      +      "type": "boolean"
      +    },
      +    "revision": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "changed",
      +    "revision"
      +  ],
      +  "type": "object"
      +}
  3. First observedv0.3.3

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, but the description adds real substance beyond them: all-or-nothing conflict semantics ("A conflict changes nothing"), live propagation to connected editors, and an explicit negative contract ("never runs code, saves an account copy or pushes Git"). Those are exactly the side-effect boundaries an agent needs before a destructive write.

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 atomic-apply purpose, then the per-field semantics, then the conflict rule, then the sibling routing — a sensible order with no filler. It is dense and relies on room-specific jargon ("format 2 room", "moves it to recovery") that a first-time agent may have to infer.

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?

For a destructive, revision-guarded mutation tool this covers the essentials: what it writes, atomicity, failure behavior, what it explicitly does not do, and where to go for the operations it excludes. Since an output schema exists, the absence of return-value documentation is not a gap.

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 0%, so the description carries the load and mostly does: text=null means delete, edition sets the Rust edition, entryFile/name can change with an empty changes array, and expectedRevision is the exact revision guard. It still does not explain the revision hash format, the 16-change cap, or the path length limit, leaving some schema details unexplained by either source.

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 ("Atomically apply file changes") plus the key constraint ("exact expected revision"). It distinguishes itself from the sibling crabrix_plan_changes by routing rename/move/restore there, so an agent can pick correctly without opening either 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?

Gives concrete when-to-use rules: rename, move or restore belong to crabrix_plan_changes, and a conflict means "read again and revise" rather than retrying blindly. It also states changes may be empty when entryFile, name or edition changes. The only gap is that it never contrasts itself with the other write-path sibling, crabrix_apply_operations.

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