Skip to main content
Glama
tumf

mcp-text-editor

by tumf

delete_text_file_contents

Delete specified line ranges from a text file using file hash for concurrency control.

Instructions

Delete specified content ranges from a text file. The file must exist. File paths must be absolute. You need to provide the file_hash comes from get_text_file_contents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rangesYesList of line ranges to delete
encodingNoText encoding (default: 'utf-8')utf-8
file_hashYesHash of the file contents for concurrency control. it should be matched with the file_hash when get_text_file_contents is called.
file_pathYesPath to the text file. File path must be absolute.
Behavior3/5

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

With no annotations, the description carries full burden. It mentions concurrency control via file_hash and that file must exist, but fails to describe error behavior (e.g., if file not found or hash mismatch), side effects, or reversibility. Partial transparency.

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?

Three concise sentences, front-loaded with the main action, no unnecessary words. Optimal length for quick comprehension.

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?

As a destructive tool with no output schema, the description lacks details on return values, error conditions, and post-deletion state. Given the existence of siblings, it does not fully cover the tool's usage context.

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 coverage is 100%, so parameter descriptions already clarify each field. The description repeats some schema info (file must exist, absolute paths) and adds provenance for file_hash. This adds slight value but not enough to raise above baseline 3.

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?

Clearly states the verb 'Delete' and the resource 'text file', specifying 'content ranges' which distinguishes it from sibling tools like append, create, insert, and patch. The description adds necessary preconditions (file existence, absolute paths, file_hash).

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?

Provides prerequisites (file must exist, paths absolute, file_hash from get_text_file_contents) that help with usage context, but does not explicitly compare with siblings or specify when to use vs. alternatives. Lacks 'when not to use' guidance.

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/tumf/mcp-text-editor'

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