Skip to main content
Glama
TripQi

Code Editor MCP Server

by TripQi

edit_blocks

Apply multiple search-and-replace edits across files in a single operation to modify code efficiently.

Instructions

Apply multiple search/replace edits in a single call.

Args: edits: List of edit specs, each with: - file_path: Absolute path - old_string: Text to find - new_string: Replacement text - expected_replacements: Match count (default 1) - ignore_whitespace: Flexible whitespace (default False) - normalize_escapes: Unescape \n, \t (default False) error_policy: "fail-fast" | "continue" | "rollback" encoding: File encoding for all edits (utf-8, gbk, gb2312).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
editsYes
error_policyNofail-fast
encodingNoutf-8

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: batch editing capability, error policies, and encoding handling. However, it misses critical details like whether edits are atomic, permission requirements, side effects on file metadata, or response format (though an output schema exists).

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 appropriately sized and front-loaded with the core purpose. The parameter details are necessary given low schema coverage, but the formatting with bullet points and defaults is efficient. Minor redundancy in listing defaults could be trimmed.

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 3 parameters with 0% schema coverage, the description compensates well with detailed param semantics. An output schema exists, so return values needn't be explained. However, for a batch mutation tool with no annotations, it could better address safety, idempotency, or error handling nuances.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate fully. It provides detailed semantics for all 3 parameters: 'edits' with sub-fields and defaults, 'error_policy' with enum values, and 'encoding' with examples. This adds substantial meaning beyond the bare schema.

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?

The description clearly states the tool's purpose as 'Apply multiple search/replace edits in a single call,' which is specific (verb+resource+scope). It distinguishes from the sibling 'edit_block' (singular) by emphasizing 'multiple' edits, but doesn't explicitly contrast with other file-related siblings like 'file_ops' or 'convert_file_encoding.'

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 description implies usage for batch text replacements across files, but provides no explicit guidance on when to use this tool versus alternatives like 'edit_block' (single edit) or 'file_ops' (general file operations). It lacks context on prerequisites, exclusions, or named alternatives.

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/TripQi/code-editor'

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