Skip to main content
Glama
codewithyasho

agentic_actions_mcp

write_file

Write content to a file, creating the file if it does not exist. Use to save data to disk.

Instructions

This function will write the given content to a file. If the file does not exist, it will be created.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
contentYes
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the auto-create behavior ('If the file does not exist, it will be created'), which is valuable. However, it does not mention whether existing files are overwritten or appended, nor any path or permission requirements.

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 that is direct and front-loaded, stating the primary function and the key creation behavior. No wasted words.

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

Completeness3/5

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

While the tool is simple and the description covers the main purpose, it lacks important details such as overwrite behavior and path handling. Given no annotations and no output schema, the description is minimally viable but not fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It only vaguely maps 'given content' to the content parameter and 'to a file' to the file parameter. No details are given about path formats, expected content type, or behavior for special paths.

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 writes content to a file, using the specific verb 'write' and resource 'file'. It also mentions creation if the file does not exist, which distinguishes it from read_file and other file-related siblings.

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 implies when to use the tool (to write or create files) and the context is clear given sibling tools like read_file and create_folder. However, it does not explicitly mention when not to use it or name alternatives, so it falls slightly short of a 5.

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/codewithyasho/MCP_DEPLOYMENT'

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