Skip to main content
Glama

emacs_buffer_write

Replace the entire content of an Emacs buffer and optionally save it to the underlying file. Use this tool to programmatically update or overwrite buffer text in Emacs.

Instructions

Write/replace content in an Emacs buffer

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
saveNoWhether to save the buffer to file (default: false)
bufferYesBuffer name
contentYesNew content for the buffer
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, the description must disclose behavioral traits; 'replace' hints at destructive overwrite, but it does not state what happens to unsaved changes, whether the buffer must already exist, or whether content is saved by default. These are material gaps for a mutating tool.

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 a single, short sentence that is easy to scan and front-loads the action. It is efficient, though 'write/replace' is slightly redundant.

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 mutating tool with no annotations and no output schema, the description is too sparse. It omits when to choose this tool over siblings and important behavioral caveats, making it only minimally viable for a simple buffer operation.

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 the parameters are already documented. The description adds the meaning of 'content' as new full-buffer content, but provides no additional semantics beyond the 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 uses a specific verb ('write/replace') and identifies the resource (Emacs buffer content). It clearly conveys full-content replacement, which helps distinguish it from emacs_buffer_edit, though it does not explicitly name that sibling.

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 about when to use this tool over emacs_buffer_create, emacs_buffer_edit, or emacs_file_save. The phrase 'write/replace' implies whole-buffer replacement, but no explicit conditions or exclusions are given.

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