Skip to main content
Glama
possible055

Relace MCP Server

by possible055

fast_apply

Destructive

Apply code changes to files using intelligent merging. For new files, writes content directly; for existing files, merges a snippet with anchor lines from the current content.

Instructions

Edit or create a file using intelligent merging.

For new files: writes content directly. For existing files: merges edit_snippet with current content using anchor lines. Anchor lines are verbatim lines copied from the existing file that help locate the exact edit target. Include 1-2 unique lines adjacent to the change. Truncation markers are recommended for larger scoped edits but not required. Markdown files keep fenced code blocks verbatim; outer fence stripping is skipped for .md/.mdx targets.

On error, the response includes a code field:

  • NEEDS_MORE_CONTEXT: merge model could not locate the target - add 1-2 unique anchor lines from immediately around the edit location.

  • APPLY_NOOP: merge returned an identical file even though the snippet contained explicit remove directives or concrete new lines not present in the original.

  • BLAST_RADIUS_EXCEEDED: edit scope too large - split into smaller edits.

  • MARKER_LEAKAGE: placeholder marker text leaked into merged output (treated as literal text).

  • TRUNCATION_DETECTED: merged output shrank drastically and no explicit remove directive was provided.

On success: {status: "ok", diff: str | None (unified diff, None for new files or no-op)}.

Do NOT use this tool to delete files or clear file contents. Use a dedicated file management tool for those operations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path (absolute or relative to MCP_BASE_DIR; if MCP_BASE_DIR is unset, relative paths resolve against MCP Roots).
edit_snippetYesCode snippet representing the changes. Include only the lines being added or modified, plus placeholder comments for unchanged parts when useful for larger scoped edits: `// ... existing code ...` (JS/TS), `# ... existing code ...` (Python/shell). Anchor the edit with 1-2 verbatim lines from the existing file.
instructionNoOptional natural language hint to disambiguate the target location (e.g., 'add after imports', 'inside the if block').

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, consistent with a mutating edit. The description adds far more: explains the merging behavior with anchor lines, truncation markers, markdown handling, and a full set of error codes with their meanings and remedies. It also documents the success response format. No contradiction with annotations.

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 description is longer than minimal but well-structured: core purpose first, then merge details, then error codes, then a do-not-use note. Each sentence adds value. A slight trim could be made (e.g., the truncation markers sentence could be part of anchor lines), but overall it's efficient and clear.

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?

Given that an output schema exists (indicated by CONTEXT SIGNALS) and the input schema is fully described, this description is complete: it covers all behavioral aspects, error handling with codes, response format, and explicit exclusions. No gaps remain for an agent to misunderstand.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 100% description coverage for all three parameters. The description still adds substantial value: for 'path' it clarifies resolution relative to MCP_BASE_DIR or MCP Roots; for 'edit_snippet' it gives concrete examples of placeholder comments and anchor line usage; for 'instruction' it provides natural language examples. This goes well beyond the schema alone.

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 opens with 'Edit or create a file using intelligent merging,' which is a specific verb+resource pair. The sibling tools are all cloud/agentic search or index utilities, so this tool is clearly distinct as a file editing tool.

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 description explicitly states when to use the tool: for new files write directly, for existing files merge with anchors. It also provides a clear do-not-use instruction: 'Do NOT use this tool to delete files or clear file contents. Use a dedicated file management tool for those operations' – directly indicating when to avoid it and naming an alternative.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/possible055/relace-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server