Skip to main content
Glama

Write file

write_file
DestructiveIdempotent

Creates or replaces one file on a Pagehaus site, using the Pagehaus files API (https://pagehaus.app/help/api). path is a file inside the site, such as "/about.html"; folders are created as needed. The change is public immediately, and replacing a file overwrites it. Binary files such as images are passed as base64 with encoding "base64".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path from the site's top, e.g. "/index.html" or "/blog/first-post.html".
siteYesThe site name.
contentYesThe file's contents.
encodingNo"text" (the default) or "base64".text

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false, and the description is consistent with them. It adds real context beyond the annotations: the change is publicly visible immediately, overwriting replaces content, folders are created on demand, and binary payloads require base64 encoding.

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?

Four short sentences, front-loaded with the core verb and resource, then path behavior, then mutation semantics, then the encoding caveat. Nothing is redundant and the API help link is the only marginal extra.

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?

For a mutation tool with no output schema, the description covers the essentials an agent needs: scope, overwrite behavior, immediate visibility, folder creation, and binary handling. Auth requirements, size limits, and error behavior are unstated, which is the only notable gap.

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

Parameters4/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, but the description adds value: it explains that path is relative to the site top with an example, that intermediate folders are created, and that encoding='base64' is required for binary files such as images.

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?

States a specific verb and resource ('Creates or replaces one file on a Pagehaus site') plus the API being used. The 'one file' scope and path semantics clearly separate it from siblings like delete_file, read_file, and list_files.

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 makes the use case clear (write a file into a site, folders auto-created, replaces existing content) and the sibling names make alternatives self-evident. It stops short of explicitly naming when to use read_file/delete_file instead, so it lacks true exclusions.

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