Skip to main content
Glama

Create or replace a file

write_file
DestructiveIdempotent

Creates or overwrites one file (folders are created as needed). Use encoding "base64" for binary files such as images. Up to 20 MB.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath relative to the website root (public_html), e.g. "index.html" or "css/style.css". Start with "~/" for the private account home folder.
siteYesThe website's domain, as shown by list_sites (e.g. "example.com" or "name.hostingfor.ai").
contentYesFile contents (UTF-8 text, or base64 when encoding is "base64").
encodingNoHow content is encoded: "utf8" for text, "base64" for binary files such as images.utf8

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo
bytesNo
savedYes
warningNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, and the description's 'creates or overwrites' is consistent with these. Beyond annotations, it adds useful side-effect context ('folders are created as needed') and a hard constraint ('up to 20 MB'), which help an agent predict the tool's impact.

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?

Two focused sentences that front-load the core purpose and then add behavior and limits. No filler, and each sentence adds necessary information for correct invocation.

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?

Given the output schema exists and parameters are fully documented, the description only needs to cover operational context. It covers overwrite semantics, folder creation, binary encoding usage, and size limit. It does not mention potential permission/authentication requirements, but these are likely outside the tool's scope and covered by the site parameter.

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 baseline is 3. The description does not introduce parameter semantics beyond the schema; the mention of base64 for binary files simply echoes the 'encoding' enum description already present in the schema.

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 explicitly states a specific verb ('Creates or overwrites') and resource ('one file'), which immediately distinguishes it from the plural sibling write_files. It also adds valuable scope details ('folders are created as needed') that clarify the operation's behavior.

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 gives clear context for when to use the tool: it writes a single file, creates folders as needed, supports binary via base64, and has a 20 MB limit. However, it does not explicitly compare with the sibling write_files (e.g., 'for multiple files use write_files'), so alternatives are only implied by the word 'one file' rather than directly addressed.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources