Skip to main content
Glama
mhattingpete

code-copy-mcp

by mhattingpete

search_and_replace

Finds and replaces text in target files, with options for case-sensitive search, replacing all occurrences, and creating backups.

Instructions

Search and replace text in target file.

Args: target_file: Path to target file search_pattern: Text to search for replacement: Replacement text case_sensitive: Whether search is case sensitive replace_all: Whether to replace all occurrences or just first create_backup: Whether to create backup file

Returns: Success message with replacement count

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
replace_allNo
replacementYes
target_fileYes
create_backupNo
case_sensitiveNo
search_patternYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description must cover behavioral traits. It mentions the 'create_backup' parameter, hinting at a safety feature, but it does not disclose that the operation modifies the file, whether it is reversible, what happens if the pattern is not found, or any permission requirements. For a mutating tool, this is a significant gap.

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 the main purpose, followed by a structured list of arguments and return value. It is succinct and each line serves a purpose, though the list format is slightly verbose for its content.

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 tool has 6 parameters, no annotations, and no output schema provided (though indicated as present). The description covers the main purpose, all parameters, and the return message, but lacks usage guidelines, edge-case handling, and deeper behavioral context. It is adequate but not fully comprehensive given the tool's complexity.

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 coverage is 0%, but the description compensates by explaining all six parameters in the Args section, e.g., 'search_pattern: Text to search for' and 'case_sensitive: Whether search is case sensitive'. This adds clear meaning beyond the bare schema, though some descriptions are minimal.

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 the function: 'Search and replace text in target file.' This specifies a verb and resource, distinguishing it from sibling tools like copy_entire_file or paste_code, which involve different operations.

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?

The purpose implies when to use (when text replacement is needed), but the description provides no explicit guidance on when to use this over alternatives, nor any exclusions or prerequisites. It relies on the user to infer usage from the tool's purpose.

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/mhattingpete/code-copy-mcp'

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