Skip to main content
Glama

Write site files

write_site_files
Destructive

Push files (HTML/CSS/JS/images) into a site's DRAFT — use this when YOU are writing the code yourself instead of asking sitectrl's AI. Text files go in 'content'; binary files (images/fonts) in 'content_base64'. Max 40 files/call, 2 MB/file. Keep the include on every HTML page (the site's built-in private analytics — publish re-adds it if missing). Use clearly-marked placeholder contact info unless the user provided real details. For working forms, POST to /_sc/form/submit with a hidden _form name field — submissions reach the owner's dashboard + email (never use mailto:). Every HTML file is checked before it's written (DOCTYPE, charset, and any invariant this site has declared) — a file that fails is refused and comes back in 'refused' with what's wrong and the exact fix; other files in the same call still write. Follow with publish_site to go live.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYes
filesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare non-readOnly and destructive. The description adds substantial operational context: 40 files/call and 2 MB/file limits, draft-vs-published semantics, the pre-write validation check with partial-failure behavior ('other files still write'), the 'refused' response field, and the sc-track.js re-add invariant on publish. This is rich disclosure well beyond what annotations provide.

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?

Dense but every sentence earns its place: limits, routing to alternative, file-split semantics, invariants, forms guidance, validation behavior, next step. Front-loads the core action. Slightly long but justified by the tool's complexity.

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?

No output schema exists, and the description compensates by explaining the 'refused' field and partial-write behavior. Covers limits, format rules, validation invariants, and the follow-up publish step. An agent has everything needed to invoke it correctly.

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 0%, so the description must compensate. It explains that text content goes in 'content' and binary in 'content_base64', which is the key discriminator between the two file-array fields. It doesn't explain 'slug' or 'path' semantics, so not a full 5.

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 (push files) and resource (into a site's DRAFT) and enumerates the file types (HTML/CSS/JS/images). Clearly distinguished from sibling edit_site and publish_site by scoping to the draft and pointing at publish_site for going live.

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?

Explicitly says when to use it: 'when YOU are writing the code yourself instead of asking sitectrl's AI.' Also routes to publish_site for going live. No explicit when-not, but the AI-vs-self distinction is strong context.

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