Skip to main content
Glama
luciVuc

Shell MCP

by luciVuc

writeFile

Create or overwrite files with text content. Use to save generated code, update configuration, or persist data as UTF-8 text. Parent directories must already exist.

Instructions

Write text content to a file, creating it if it does not exist or overwriting it if it does. The file is written atomically as UTF-8. Use this to create new files, update configuration, save generated code, or persist any text data. Parent directories must already exist. Returns a confirmation message with the resolved file path on success. Paths targeting sensitive system directories (e.g. /etc/shadow, /proc/, /dev/) are blocked.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute or relative path to the file to write. Relative paths are resolved from the server's working directory. Must not be empty or contain null bytes. Examples: `/tmp/output.txt`, `./results.json`.
contentYesThe full text content to write to the file. This completely replaces any existing file content. Can be an empty string to create/truncate a file.
Behavior5/5

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

With no annotations, the description fully discloses key traits: atomic write, UTF-8 encoding, requirement for existing parent directories, blocking of sensitive system paths, and confirmation message with resolved path. This enables informed agent decisions.

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 concise and well-structured, with four sentences covering purpose, mechanics, use cases, and constraints. A minor improvement would be to front-load the most critical constraint (parent directories must exist) earlier.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple file write tool with two parameters and no output schema, the description covers all essential aspects: creation vs overwrite, atomicity, encoding, prerequisites, blocked paths, and return value. It is fully sufficient for an agent to understand and invoke the tool correctly.

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%, setting baseline at 3. The description repeats the schema's definitions and adds a few examples but does not provide significant additional semantics beyond what the schema already offers (e.g., format constraints, behavior nuances).

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 verb 'write' and resource 'file', specifying create or overwrite behavior. It differentiates from sibling tools like readFile and deleteFile by listing concrete use cases: create new files, update configuration, save generated code.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit use cases for writing files, which helps the agent decide when to use this tool. However, it does not contrast with alternatives (e.g., exec for non-file operations) or state when not to use it, slightly reducing clarity.

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/luciVuc/shell-mcp'

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