Skip to main content
Glama

code_write_files

Destructive

Commit one or more files to a code site's repo in a single commit (create or overwrite). files is a JSON array of {"path":"...","content":"..."}. This pushes to the default branch; if the site is Vercel-linked, the full repo snapshot is also deployed to Vercel in the same call — then poll code_deploy_status.

Input Schema

NameRequiredDescriptionDefault
filesYesJSON array: [{"path":"src/index.ts","content":"..."}]
messageNoCommit message
site_idYesCode site id

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, idempotentHint=false, and openWorldHint=true. The description adds concrete behavior beyond them: writes always target the default branch with no branch choice, existing files are overwritten, and a Vercel deployment side effect fires in the same call. It omits permission/auth requirements and error behavior.

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?

Three tightly packed sentences with the action and overwrite semantics front-loaded, then the input format, then the side effect and next step. No filler or restated boilerplate.

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?

With no output schema, the description carries return-value burden and does mostly well by pointing to code_deploy_status for the deployment outcome. It leaves unstated what the commit confirmation looks like and what happens on failure, but an agent has enough to call it correctly.

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 the baseline is 3. The description restates the `files` format (JSON array of path/content) already documented in the schema and never explains message or site_id, adding no meaning beyond the structured fields.

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 (commit files to a code site's repo), specifies the scope (single commit), and clarifies create-vs-overwrite semantics. An agent can distinguish it from siblings like code_deploy_status, github_create, and the wp_* write tools without opening any schema.

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 operational context: files go to the default branch, and for Vercel-linked sites a deploy is triggered in the same call, so the agent should poll code_deploy_status afterward. It names the follow-up tool explicitly, but offers no explicit when-not or guidance on choosing this over github_create/wp_update_page for other site types.

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