Skip to main content
Glama

merjax_write_file

Create or update a file on a branch via git plumbing. Wraps createOrUpdateFileOnBranch. Pass content as a UTF-8 string OR content_base64 for binary. Meets the same branch protection, rulesets and secret scan as a git push, and fires CI/webhooks like one. Requires 'repo' scope.

Input Schema

NameRequiredDescriptionDefault
pathYes
repoYes
ownerYes
branchYes
contentNoUTF-8 file body (optional)
messageYesCommit message
content_base64NoBase64 file body (optional)
expect_blob_shaNoOptimistic-concurrency check: existing blob sha must match.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), it discloses that the write is subject to branch protection, rulesets and secret scanning, that it fires CI and webhooks, and that it requires the 'repo' scope. These are exactly the operational facts an agent needs before attempting a mutation. It stops short of stating overwrite behavior, conflict/failure modes, or what a rejected write returns.

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?

Four compact sentences, front-loaded with purpose, then encoding choice, then enforcement side effects, then auth. The only near-waste is the internal wrapper name `createOrUpdateFileOnBranch`, which adds little for an agent but is short enough not to hurt.

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 an eight-parameter mutation tool with no output schema, the description covers the risky parts: permissions, policy enforcement, side effects, and body encoding. Missing pieces are the return value (implied commit/blob) and what happens when the optimistic-concurrency check or branch protection rejects the write, but the essentials for correct invocation are present.

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?

With schema coverage at 50%, the description compensates well by explaining that `content` and `content_base64` are alternative encodings of the same body and when to pick the binary one — a relationship the schema does not state, since both are merely marked optional strings. `expect_blob_sha` is only covered by the schema itself, so the description does not fully close the coverage gap.

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?

"Create or update a file on a branch via git plumbing" gives a specific verb and resource, and the wrapping note (`createOrUpdateFileOnBranch`) confirms the semantics. It is clearly distinguishable from siblings like merjax_delete_file or merjax_read_file, though it never explicitly contrasts itself with merjax_apply_patch or merjax_atomic_multi_file_commit, which also write file content.

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

Usage Guidelines3/5

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

The description supplies a concrete selection rule between two parameters (use `content` for UTF-8 text, `content_base64` for binary), which is genuinely useful. However, it gives no when-to-use guidance relative to the many competing write tools in the sibling list (patch application, multi-file atomic commit), leaving the routing decision to the agent.

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