Skip to main content
Glama

Edit a file

artifact_site_edit
Destructive

Update one text file in an existing remote page without changing its URL or other files. Read the file first, then submit replacement text and version to create a new version.

Instructions

Change one text file in an existing remote page or website, keeping the other files and the artifact URL. Use for 'fix the heading' or 'update this chart script'. Read the file first, then submit its complete replacement text and the version you read. Creates a new version. A 409 requires reading the latest version before retrying; do not blindly overwrite a concurrent edit. Use update for a whole project or binary document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesRelative text filename from get_site, such as index.html.
slugYesArtifact identifier returned by find/publish, or the slug in its /s/ URL. Not a local path.
contentYesComplete new text of this file, not a diff.
tenant_idNoDestination tenant for creation; defaults to the account tenant.
share_tokenNoToken from a user-provided share URL; carries only that share permission.
operation_keyNoPersist a unique key before this write. Reuse exactly the same key and arguments after errors; recover results for seven days using operation_status.
expected_versionYesVersion ID read before the edit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the destructiveHint and readOnly=false annotations, the description adds key runtime behavior: the operation creates a new version, concurrent edits surface as 409, and the agent must not blindly overwrite a concurrent edit. This materially changes how the tool should be invoked and handled.

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 a compact paragraph that front-loads the core action, follows with concrete example use cases and preconditions, then handles the conflict case and alternative tool. Every sentence contributes distinct guidance.

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?

For a single-file mutation tool with rich schema coverage and no output schema, the description covers selection, preconditions, invocation contract, conflict handling, and the sibling alternative. There is no significant missing information an agent needs before calling it.

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?

The input schema already covers all seven parameters at 100%, so the description does not need to repeat details. It adds the workflow-level reinforcement that content must be the complete file and expected_version must come from the prior read, but this is only marginal beyond the schema's own descriptions.

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 action ('Change one text file...'), identifies scope ('keeping the other files and artifact URL'), and gives concrete example queries ('fix the heading' or 'update this chart script'). It is clearly distinguished from the sibling update tool by limiting to a single text file.

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

Usage Guidelines5/5

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

Explicitly tells the agent to read the file first and submit the complete replacement text plus the version read. It also names the alternative for whole-project/binary edits ('Use update ...') and prescribes the retry behavior after a 409.

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