Skip to main content
Glama
MIRAI Intelligence & Research MCP

MIRAI Intelligence & Research MCP

by Tarant336

Source Modify

source_modify
Destructive

Replace an exact string in a workspace file while rejecting ambiguous non-unique edits unless replaceAll is set; writes atomically and reports before/after hashes.

Instructions

Perform an exact string replacement inside a workspace file, refusing ambiguous (non-unique) edits unless replaceAll is set. Writes atomically and reports before/after hashes.

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": {
      "relativePath": "<relativePath>",
      "oldString": "<oldString>",
      "newString": "<newString>"
    },
    "name": "source_modify"
  }
}

Input Schema

NameRequiredDescriptionDefault
newStringYesReplacement text.
oldStringYesExact text to replace.
replaceAllNoReplace every occurrence (default: require uniqueness).
relativePathYesFile to edit, relative to the workspace root.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, readOnlyHint=false, and idempotentHint=false, so the safety profile is covered. The description adds genuinely new behavior: rejection of ambiguous non-unique matches, atomic writes, and hash reporting before/after — details the annotations cannot convey. It stops short of saying how the ambiguity error surfaces to the caller.

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?

Two sentences, zero padding, with the core operation and the ambiguity-refusal rule front-loaded before the atomicity/hash note. Every clause carries 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?

With no output schema, the description correctly compensates by stating that before/after hashes are reported. For a destructive mutation tool it covers the essential risk and success signal, though it omits how failures (non-unique match) are returned to the caller.

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

Parameters3/5

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

Schema description coverage is 100%, so all four parameters are already documented, including replaceAll's default uniqueness behavior. The description reinforces the uniqueness semantics but adds no syntax, format, or edge-case detail beyond the schema, so the baseline 3 applies.

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 names a specific verb and resource — exact string replacement inside a workspace file — and the qualifier 'exact string replacement' implicitly separates it from broader siblings like source_refactor or source_generate. An agent can tell what this does without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the refusal of non-unique edits hints at when to set replaceAll, but the description never names an alternative (e.g. source_refactor) or states when this tool should be preferred over one. There are no explicit exclusions or preconditions.

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