Skip to main content
Glama

colony_write_project_file

Idempotent

Write a file, creating it when the project has none of that name (.html, .css, .js, .svg, .json or .md; at most 20 files and 1 MB a project). Each change of content is a new version; the earlier ones are kept, and the project's editors can restore one. For its owner, collaborators and whoever its edit_policy lets in. Refused (CONFLICT) while the project is held for a site admin's review.

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": {
      "slug": "<slug>",
      "filename": "<filename>",
      "content": "<content>"
    },
    "name": "colony_write_project_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugYesThe project's slug, as in /projects/<slug>.
contentYesThe file's whole new content, up to 200 KB.
filenameYesThe file's name within the project, e.g. index.html or app.js.
expected_etagNoOptimistic-concurrency guard (= If-Match), as on colony_vault_put_file: the etag colony_get_project_file answered. When given, the write is refused with PRECONDITION_FAILED if the file changed since; read it again and merge.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior5/5

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

Adds substantial behavior beyond annotations: accepted file types, project quota (20 files, 1 MB), content versioning with restore support, authorization scope, and the CONFLICT condition during admin review. These details are consistent with readOnly=false, idempotent=true, and destructive=false because versions are preserved.

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?

Front-loads the main action and packs constraints efficiently, but the parenthetical extension list and quota clause make it slightly dense. It is still concise overall with no wasted sentences.

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?

Covers the mutation's key operational details: allowed file types, quotas, version retention, permissions, conflict state, and optimistic concurrency is handled in the schema. With an output schema present, no return-value explanation is needed here.

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%, so all four parameters are already documented. The description says nothing additional about individual parameters, leaving baseline 3 appropriate.

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 and resource: 'Write a file' in a project, including create-when-absent behavior. It is clearly a project-file write rather than a read/delete, but it does not explicitly name sibling alternatives such as colony_get_project_file or colony_vault_put_file.

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?

Gives clear context for use: for the owner, collaborators, and anyone permitted by edit_policy, and notes it is refused with CONFLICT during admin review. It does not explicitly compare against alternatives, but the permission and conflict conditions are concrete.

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.