Skip to main content
Glama
EtienneBBeaulac

Multi-Workspace MCP Server

edit_crossproject

Apply consistent search-and-replace edits across multiple files in configured companion workspaces, with optional regex support and replaceAll for repetitive cross-project updates.

Instructions

Apply search-and-replace edits to one or more files in a configured workspace root, typically for companion repos outside the current project workspace. Prefer built-in IDE refactoring/editing tools for typed changes in the current workspace. The same find/replace runs on all specified files; oldString must be unique per file unless replaceAll is true. If a writeAllowlist is configured, only matching paths are editable. When useRegex=true, newString supports regex backreferences ($1, $2, etc.).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYesSingle file path or array of file paths relative to workspace root
useRegexNoTreat oldString as a regex pattern (default: false). Enables $1/$2 backreferences in newString.
newStringYesReplacement string. When useRegex=true, supports $1/$2 backreferences for capture groups.
oldStringYesString to find and replace (must be unique in each file unless replaceAll=true)
workspaceYesWorkspace name (none configured — create a workspace-config.json)
replaceAllNoReplace all occurrences in each file (default: false, requires uniqueness)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden and does it well: it discloses that the same find/replace runs on all specified files, that oldString must be unique unless replaceAll is true, that writeAllowlist can restrict editable paths, and that useRegex enables backreferences. It stops short of describing failure behavior or reversibility, but it covers the most operationally important traits.

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?

The description is five concise sentences with no filler. It front-loads the core purpose, then adds usage preference, matching rules, allowlist constraints, and regex behavior in a logical order. Every sentence contributes operational information.

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 mutation tool with no annotations and no output schema, the description covers a broad set of needed context: purpose, workspace scope, tool-selection guidance, uniqueness rules, write restrictions, and regex semantics. The main omissions are expected return values and behavior on partial multi-file failure, but the tool remains confidently invocable.

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?

The schema already covers 100% of parameters, so the baseline is 3. The description adds valuable cross-parameter meaning by clarifying that the replacement is applied uniformly across all paths, that per-file uniqueness is required unless replaceAll is set, and that writeAllowlist can further constrain path editability. This is meaningful value beyond the schema fields.

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 specifies a precise action ('Apply search-and-replace edits') and a concrete resource ('one or more files in a configured workspace root'). It also clarifies that the tool is typically for companion repos outside the current project workspace, which distinguishes it from sibling read/write/list/search/run tools.

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?

The description explicitly advises preferring built-in IDE refactoring/editing tools for typed changes in the current workspace, giving a clear when-not-to-use alternative. It also establishes the intended context: companion repos outside the current project workspace. It does not enumerate each sibling distinction, but the guidance is sufficient for typical selection.

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