Skip to main content
Glama
TripQi

Code Editor MCP Server

by TripQi

edit_blocks

Update code across multiple files by applying search-replace edits in one batch. Supports flexible whitespace, escape characters, and error handling policies like rollback.

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?

No annotations are provided, so the description must carry behavioral transparency. It explains error policy and encoding, but does not disclose side effects, permissions, or what happens on success/failure. Adequate but not thorough.

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 well-structured with an Args section, each parameter listed clearly. It is moderately concise; every sentence adds value, though slightly lengthy but justified by parameter complexity.

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 existence of an output schema (unseen), the description need not cover return values. It covers all three parameters, error handling choices, and encoding options. Lacks prerequisites or limitations but is fairly complete for a batch operation tool.

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?

With 0% schema description coverage, the description fully compensates by detailing each field of 'edits' (file_path, old_string, new_string, etc.) and explaining error_policy and encoding with examples. Adds significant value beyond the schema.

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 'Apply multiple search/replace edits in a single call,' which is specific and distinguishes from the sibling tool 'edit_block' that handles single edits.

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?

The description does not explicitly guide when to use this tool versus alternatives like 'edit_block'. It only implies batching by saying 'multiple', but lacks clear usage context or exclusions.

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