Skip to main content
Glama
Beat Saber Modding Tools MCP

Beat Saber Modding Tools MCP

by denpadokei

replace_in_file

Apply literal or regular-expression replacements in a file to update Beat Saber mod source or configuration, with dry-run preview for controlled edits.

Instructions

Replace text in a file (literal or regular expression), mirroring BSMT's ReplaceInFile task.

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": {
      "file": "<file>",
      "pattern": "<pattern>",
      "substitute": "<substitute>"
    },
    "name": "replace_in_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYes
dry_runNo
patternYes
multilineNo
use_regexNo
singlelineNo
substituteYes
escape_backslashNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already state readOnlyHint=false, destructiveHint=false, openWorldHint=false, so the safety profile is covered. The description adds nothing beyond that: it doesn't say whether a non-matching pattern throws or no-ops, whether the write is atomic, whether all matches or only the first are replaced, or what dry_run does. For a mutation tool this leaves real behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, front-loaded with the action, so no bloat. But it is under-specified rather than concise: a fifth of the text is spent on an unexplained internal reference ('BSMT's ReplaceInFile task') while the eight-parameter behavior goes unmentioned.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The output schema exists, so return values need no explanation, lowering the bar. Still, for a write tool with 8 undocumented parameters and no match/error semantics disclosed, the definition falls short of what an agent needs to call it confidently.

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 0% across 8 parameters, so the description carries the burden. It only hints at use_regex via 'literal or regular expression'; dry_run, multiline, singleline, and escape_backslash are left completely undefined in both schema and description, which is a meaningful shortfall even granting credit for the regex hint.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb and resource: 'Replace text in a file', with the mode scope '(literal or regular expression)'. The clause 'mirroring BSMT's ReplaceInFile task' is product jargon that adds no discriminating power, but the core action is unambiguous and clearly distinct from the mod/reference-management siblings.

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

Usage Guidelines2/5

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

No when-to-use, when-not-to-use, or alternative guidance at all. Nothing tells the agent whether to prefer this over build/package style siblings, nor what preconditions apply (e.g. file must exist, pattern must match).

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