Skip to main content
Glama

Update project files

update_project_content
DestructiveIdempotent

Merge or replace files in a Google Apps Script project. Merge upserts named files and can delete listed ones; replace makes the supplied files the entire project.

Instructions

Writes code files to the project's HEAD (deployed versions are untouched until you create a version + deployment). Two modes. mode="merge" (default, safer): the current content is read first, the given files are added or overwritten BY NAME, delete_files removes named files, everything else is preserved — not atomic, a concurrent edit between read and write is lost. mode="replace": the given files become the ENTIRE project; any file not in the list is deleted, and the list must include the "appsscript" manifest (type json) or the call is rejected before hitting the API. File names carry no extension ("Code", not "Code.gs"); the manifest cannot be deleted. Returns the resulting file set. This write is never retried after a 5xx or timeout — check with get_project_content before re-sending.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNomerge (default): upsert the given files, keep the rest; replace: the given files become the whole project (manifest "appsscript" required).
filesYesThe files to write (merge: upserted by name; replace: the entire new file set).
script_idYesThe script project id — from the Apps Script editor URL (script.google.com/home/projects/<scriptId>/edit) or from create_project output. For standalone projects it doubles as the Drive file id.
delete_filesNomerge only: file names to remove (no extension). The "appsscript" manifest cannot be deleted.
Behavior5/5

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

Annotations already indicate destructive and non-read-only behavior, but the description goes much further: it explains the read-modify-write race in merge mode, the total deletion semantics of replace mode, the mandatory appsscript manifest, rejection before API call if missing, and the lack of automatic retries after 5xx/timeout. It also discloses the naming convention and the fact that the manifest cannot be deleted. No contradiction with annotations 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 dense but every sentence adds essential information: the main effect, the two modes, merge semantics, replace semantics, naming/manifest constraints, return value, and retry behavior. It is front-loaded with the primary purpose and avoids filler or repetition.

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 mutating tool with no output schema, this description covers all critical aspects: the operation, mode behavior, preconditions, constraints, return value, and failure handling. Even though the schema documents each parameter well, the description supplies the missing behavioral context needed to call the tool safely and 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 100%, so the baseline is 3. The description nevertheless adds operational meaning beyond the schema: it clarifies that files are upserted BY NAME, that delete_files only applies to merge mode, that the manifest is required in replace mode, and that names carry no extension. These are useful execution details directly tied to parameters.

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 and resource: 'Writes code files to the project's HEAD.' It also clearly differentiates from deployment-related siblings by noting deployed versions remain untouched until a version and deployment are created. The two modes are named and their effects are distinguishable, so an agent knows exactly what operation this tool performs.

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?

Provides concrete usage context for both modes: merge is the default and safer option, replace makes the files the entire project. It also references the appropriate sibling tool for recovery ('check with get_project_content before re-sending') and explains when deployed content changes, connecting to create_version/deployment workflow. This gives explicit when-to-use and when-not-to-use guidance.

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/A1-x-Tech/mcp-google-apps-script'

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