Skip to main content
Glama

ship

Destructive

Apply multi-file edits or patches plus creates, moves, and deletes in one call, then run verify commands; on failure, restore every file and return the failing output.

Instructions

Edit files and run the tests in ONE call. Applies search/replace edits or a patch, new files, moves and deletes across any number of files, then runs your verify command(s). If verify fails, every file is restored byte-for-byte and you get the failing output. If an edit cannot be applied, nothing is written and the reply shows the nearest text. Prefer it over separate edit calls (or apply_patch) plus a test run whenever a change spans files or must pass a check.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ship"
  }
}

Input Schema

NameRequiredDescriptionDefault
rootNoSubdirectory of the workspace to work in (default: the workspace root).
editsNoSearch/replace edits. search is text copied from the file and must identify one place, unless replace_all. Several edits may name the same file.
movesNoRename or move files. Edits in the same call use the new path.
patchNoInstead of edits: one patch for any number of files, in apply_patch format (*** Begin Patch / *** Update File: path / @@ / lines starting with space, - or +) or as a unified diff.
verifyNoCommands that must each exit 0, run in order, e.g. ["npm test"]. {files} becomes the files this call changed (e.g. "npx vitest related {files} --run"). Omit only for untestable changes.
writesNoCreate or fully replace files.
deletesNoFiles to delete.
timeout_msNoPer-command verify timeout (default 60000, max 300000).
allow_secretsNoAllow changing secret files.
rollback_on_failNoRestore files if verify fails (default true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.0
    • changedInput schema / properties / verify / description
      Previous value: -"Commands that must each exit 0, run in order, e.g. [\"npm test\"]. Omit only for untestable changes."New value: +"Commands that must each exit 0, run in order, e.g. [\"npm test\"]. {files} becomes the files this call changed (e.g. \"npx vitest related {files} --run\"). Omit only for untestable changes."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, yet the description still adds the key behavioral fact: the call is transactional, restoring every file byte-for-byte if verify fails, and writing nothing at all if an edit cannot be applied. That failure-mode disclosure is exactly the kind of context annotations cannot convey; it stops short only of describing the success response and whether rollback can be disabled (that lives in the schema).

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?

Four sentences, front-loaded with the core action and then layering atomicity, failure behavior, and the routing rule. No sentence is redundant with another, and the closing sentence functions as the decision cue rather than filler.

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 destructive mutation tool with no output schema, the description covers the critical risk surface (atomic rollback, no partial writes, nearest-text diagnostics on failed edits) and gives a concrete verify-command example with {files}. It leaves the success-path return shape and any workspace/auth constraints unstated, which is a modest but real 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 coverage is 100%, so the baseline is 3, but the description adds operational meaning the schema does not: edits run first and verify runs afterward, alternate input modes (edits vs patch) are mutually exclusive paths, and moves interleave with edits. It does not elaborate on root scoping or timeout behavior beyond what the schema already states.

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?

"Edit files and run the tests in ONE call" gives a specific verb pair plus the distinguishing feature (atomic edit+verify), and the description enumerates the edit modalities: search/replace edits, patch, new files, moves, deletes. It also explicitly separates itself from "separate edit calls (or apply_patch) plus a test run," so an agent can tell it apart from sibling batch tooling.

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?

The final sentence states the selection rule precisely: prefer this over separate edit calls or apply_patch plus a test run when a change spans files or must pass a check. It also gives an exclusion for the verify step ("Omit only for untestable changes"), so both when-to-use and when-to-skip are covered.

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

Deploy Server

Other Tools