Skip to main content
Glama
Pajand

OpenCOOP MCP Server

by Pajand

edit_file

Perform targeted edits by locating exact text and replacing it with new content. Provide a file path, search string, and replacement to update specific occurrences without altering the rest of the file.

Instructions

Make a targeted edit to a file using search and replace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesRelative file path
searchYesExact text to find
replaceYesText to replace with
replace_allNoReplace all occurrences

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.11.1

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries full responsibility for disclosing behavior. It only states the action and mechanism, not what happens on a failed search, whether the edit is atomic, whether replacement requires unique matches, or whether any locking protocol is relevant. For a mutation tool this is a significant transparency gap.

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?

One short sentence that is front-loaded with the verb and resource before explaining the mechanism. Every word earns its place, and there is no redundancy or filler.

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

Completeness2/5

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

The tool is a mutation with no annotations and no output schema, so more behavioral context is needed than what is provided. There is no mention of failure behavior when no match is found, whether replace_all replaces across the whole file by default, or how success is reported. The schema covers parameters, but operational context is missing.

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%, and the parameter descriptions already explain 'path', 'search', 'replace', and 'replace_all'. The tool description adds no per-parameter information, but the schema already does the heavy lifting, so a baseline score of 3 is appropriate.

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 uses a specific verb ('edit') with a resource ('file') and the exact mechanism ('search and replace'). The word 'targeted' distinguishes this from write_file, which would replace or create an entire file. This is a clear, unambiguous purpose statement.

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?

There is no explicit guidance on when to use this tool instead of write_file or when a targeted edit is appropriate. The phrase 'targeted edit' implies a contrast with full-file writes, but it does not state prerequisites, exclusions, or alternative conditions. The agent is left to infer usage from the sibling tool names.

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