Skip to main content
Glama
skyispainted

Codepage Bridge MCP

by skyispainted

Performs exact string replacements in files.

Edit

Replace exact strings in files with new text, preserving indentation. Requires prior file read for context.

Instructions

Performs exact string replacements in files.

Usage:

  • You must use your Read tool at least once in the conversation before editing. This tool will error if you attempt an edit without reading the file.

  • When editing text from Read tool output, ensure you preserve the exact indentation (tabs/spaces) as it appears AFTER the line number prefix. The line number prefix format is: line number + tab. Everything after that is the actual file content to match. Never include any part of the line number prefix in the old_string or new_string.

  • ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.

  • Only use emojis if the user explicitly requests it. Avoid adding emojis to files unless asked.

  • The edit will FAIL if old_string is not unique in the file. Either provide a larger string with more surrounding context to make it unique or use replace_all to change every instance of old_string.

  • Use replace_all for replacing and renaming strings across the file. This parameter is useful if you want to rename a variable for instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesThe absolute path to the file to modify
new_stringYesThe text to replace it with (must be different from old_string)
old_stringYesThe text to replace
replace_allNoReplace all occurrences of old_string (default false)
Behavior4/5

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

With no annotations, the description covers key behavioral traits: edit will fail if old_string not unique, errors without prior read, and replace_all behavior. It could enhance by explicitly stating it's a mutation (destructive) action, but overall transparent.

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 front-loaded with purpose and provides detailed bullet points. While slightly lengthy, every sentence adds value. Could be tightened without losing clarity.

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?

Given the absence of an output schema, the description sufficiently explains behavior and constraints (reading before editing, uniqueness failure). It addresses common pitfalls, making it complete for a string replacement tool.

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 has 100% coverage, but the description adds valuable context: uniqueness constraint for old_string, difference from replace_all, and emphasis on exact matching (indentation). This goes beyond the schema descriptions.

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 clearly states 'Performs exact string replacements in files.' with a specific verb ('replace') and resource ('files'). It distinguishes from siblings: Grep (search), Read (read), Write (write).

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 provides explicit usage guidance: must read file before editing, preserve exact indentation, prefer editing existing files, avoid emojis, uniqueness requirement for old_string, and when to use replace_all. It also tells when not to use (e.g., avoiding unnecessary new files).

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/skyispainted/codepage-bridge-mcp'

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