Skip to main content
Glama

Write files to the draft

write_files
DestructiveIdempotent

Create or replace files in the site's draft. The live site does not change until the site is published. Text as utf8; images and fonts as base64.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site": "<site>",
      "files": "<files>"
    },
    "name": "write_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteYesthe site's clay.site name (subdomain) or its id
filesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so 'create or replace' is consistent with them, and the description adds genuinely new context by saying the live site is untouched until publish. It still omits what happens to an existing file at a colliding path beyond the word 'replace', any permission or quota constraints, and the 50-file cap the schema enforces.

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?

Three short sentences, front-loaded with the action and followed by the staging caveat and encoding rule; no filler. Slightly clipped phrasing ('Text as utf8; images and fonts as base64') reads telegraphically but stays unambiguous.

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?

For a destructive write tool with no output schema and only half its parameters documented, the description covers the most important unknown (live site unaffected until publish). It does not cover overwrite-on-collision semantics, encoding defaults per file type at the item level, or failure behavior, so an agent would still need to inspect the schema and guess at edge cases.

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?

At 50% schema coverage, the description compensates partially by mapping content type to encoding (utf8 text, base64 for images/fonts), which is the highest-risk parameter to get wrong. It says nothing about the meaning of 'path' (format, directory structure, extension handling) or which sites the site identifier resolves to, both of which live only in terse schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb pair and resource ('Create or replace files in the site's draft'), plus the critical scope that only the draft is touched. It stops short of explicitly distinguishing itself from sibling delete_files or upload_to_library, so an agent must infer that this writes site draft files rather than library assets.

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

Usage Guidelines3/5

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

The draft-vs-live sentence implies the appropriate moment to use it (editing site content before publishing, with publish as the follow-up step). However, no explicit when-not guidance or named alternative such as upload_to_library for reusable assets is given, leaving routing to inference.

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