Skip to main content
Glama

emacs_buffer_edit

Apply targeted find-and-replace edits to an Emacs buffer and optionally save the buffer to its file.

Instructions

Apply targeted edits to a buffer (find and replace)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
saveNoWhether to save the buffer to file (default: false)
bufferYesBuffer name
new_textYesReplacement text
old_textYesText to find and replace
Install Server

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only says 'targeted edits' and 'find and replace', omitting important behavior such as whether all occurrences are replaced or only the first, what happens if old_text is not found, whether the buffer must already exist, and the implications of the save parameter. The schema explains 'save' but not the edit behavior.

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?

The description is a single sentence with no fluff: 'Apply targeted edits to a buffer (find and replace)'. It is front-loaded with the action and resource, and every word earns its place.

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?

For a mutation tool with no annotations and no output schema, the description is minimal. It omits behavior around unmatched text, multiple matches, buffer existence, and save defaults. An agent can infer the basic call from the schema, but unsupported edge cases are left unspecified, which is a notable gap.

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%, so each parameter already has a description. The tool description adds no new parameter meaning beyond echoing 'find and replace', which maps to old_text and new_text. The baseline of 3 is appropriate because the schema does the heavy lifting.

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 states a specific verb and resource: 'Apply targeted edits to a buffer' with 'find and replace' clarifying the mechanism. It is clear and distinguishes itself from sibling tools like emacs_buffer_write, which would replace the entire buffer, though it does not explicitly name that alternative.

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?

No guidance is provided on when to use this tool versus alternatives such as emacs_buffer_write or emacs_eval. The description states what it does but does not specify conditions, exclusions, or named alternatives, leaving the selection decision entirely to the agent.

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

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/mandoo180/emacs-mcp'

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