Skip to main content
Glama
oemoem12

lmstudio-agent-mcp

by oemoem12

agent_write_file

Destructive

Write text content to files, optionally appending and auto-creating parent directories.

Instructions

Write text content to a file, optionally creating parent directories.

Args: path: Absolute or relative path to the file. content: Text content to write. encoding: Text encoding to use. append: If True, append to the file instead of overwriting. create_dirs: If True, create parent directories when they do not exist.

Returns: str: JSON string with keys 'success', 'path', 'bytes_written', and 'operation' ('append' or 'overwrite').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute or relative path to the file to write.
appendNoIf True, append to the file instead of overwriting.
contentYesText content to write to the file.
encodingNoText encoding to use when writing the file.utf-8
create_dirsNoIf True, create parent directories when they do not exist.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

The description discloses key behavioral traits: append vs. overwrite behavior, optional parent directory creation, and the return format (JSON string with success, path, bytes_written, operation). These add value beyond the annotations (which already mark the tool as destructive and not read-only). There is no contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the main action and structured with Args/Returns sections, which aids readability. However, the Args block duplicates the schema's parameter descriptions verbatim, adding redundancy. While not overly long, the repetition prevents a higher score for conciseness.

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?

The description is quite complete for a file-writing tool. It covers the operation, parameters, defaults, and return value. An output schema exists, so return data is further specified. Missing elements like error handling or permissions are not critical for this context. The main gap is the lack of usage guidance, but that is already scored under dimension 2.

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 schema already documents all five parameters. The description's Args section largely repeats this information (parameter names, defaults, and brief explanations) without adding new semantic detail. Thus, it earns the baseline score of 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?

The description clearly states the tool's function: 'Write text content to a file, optionally creating parent directories.' This is a specific verb+resource combination that distinguishes it from sibling tools like reading, executing commands, or memory operations.

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 provides no guidance on when to use this tool versus alternatives. It does not mention scenarios where file writing is preferable to other operations, nor does it mention any exclusions or prerequisites. The only implied usage is 'writing text to files,' but no explicit context or alternative comparisons are given.

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/oemoem12/lmstudio-agent-mcp'

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