Skip to main content
Glama

Write Site File

write_site_file
Destructive

Write files directly to a Local by Flywheel site's directory. Supports any site path except WordPress core folders, with writes enabled via FS_ALLOW_WRITES.

Instructions

Write content to a file in the Local by Flywheel site directory. Requires FS_ALLOW_WRITES=true. Cannot write to wp-admin/ or wp-includes/ (WordPress core). Path is relative to the site root.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesRelative path from site root (e.g., "app/public/wp-content/themes/mytheme/functions.php")
siteNoSite name, ID, or domain. Uses env var if not specified.
contentYesFile content to write
Behavior4/5

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

The annotations already indicate destructiveHint=true and readOnlyHint=false. The description adds meaningful behavioral context by specifying the FS_ALLOW_WRITES environment requirement and the core directory restrictions, which are not fully captured by the annotations. No contradiction exists.

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 three short sentences that front-load the primary action and then compactly list requirements and restrictions. Every word earns its place, with no fluff or repetition.

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 write tool without an output schema, the description covers the key prerequisites (FS_ALLOW_WRITES), restrictions (wp-admin/ and wp-includes/), and path semantics. It doesn't mention overwrite behavior or error responses, but given the tool's simplicity and the annotation coverage, it is adequately complete.

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%, with all three parameters (path, site, content) fully described in the input schema. The description's note that path is relative to site root is redundant with the schema's path description, so it adds no additional semantic value beyond 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 clearly states the tool writes content to a file in the Local by Flywheel site directory, using a specific verb and resource. It distinguishes itself from sibling tools like read_site_file by specifying the write operation and includes constraints on wp-admin/ and wp-includes/, which further clarifies its purpose.

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 provides clear context by requiring FS_ALLOW_WRITES=true and explicitly stating cannot-write-to conditions for wp-admin/ and wp-includes/. While it doesn't name alternative tools directly, the write-vs-read distinction relative to read_site_file and file-related siblings is implied through the tool's purpose and sibling context.

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/teamchrisfromthelc/local-wp-mcp'

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