Skip to main content
Glama

Commit file changes to GitHub

github_commit_files
Destructive

Commits multiple file changes to a GitHub branch atomically. Use dry-run to preview sizes, line changes, and edit matches before applying.

Instructions

One atomic commit that adds, updates, edits or deletes several files on a branch (Git Data API); the site's CI/CD then deploys. Per file give exactly one of: content (full replacement; set encoding=base64 for binary), edits (in-place find/replace against the branch's current file, right for large files such as a 300 KB content bundle), or delete. createBranch=true creates the branch from the default branch first. dryRun previews sizes, changed-line counts and whether each edit matches exactly once, without committing.

Input Schema

NameRequiredDescriptionDefault
repoYesRepository as 'owner/name', e.g. 'octocat/my-site'.
filesYes
branchYesBranch to commit to, e.g. 'main'.
dryRunNoPreview only: report each file's action, sizes and changed-line counts (edits are validated) without committing.
messageYesCommit message in the repository's conventions.
createBranchNoIf true, create `branch` from the repo's default branch when it does not exist yet.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructive and non-idempotent, and the description adds meaningful context beyond them: commits are atomic, edits apply in order against the branch's current content and require an exact single match unless all=true, the file must exist and be text, and dryRun validates matches and reports sizes/changed-line counts without committing.

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-loaded with the core purpose and otherwise dense with no filler; two sentences carry a lot of required detail. The sentences run long, but every clause earns its place by describing a distinct per-file mode or flag.

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 destructive, multi-mode mutation tool with no output schema, the description supplies the mode selection rules, atomicity, exact-match semantics, branching behavior, and dry-run validation an agent needs to invoke it 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 coverage is 83%, so the baseline is 3, but the description adds real meaning: encoding=base64 is for binary files, edits is find/replace with single-match requirement, createBranch seeds from the default branch, and dryRun previews per-file action, sizes, and changed-line counts. It leaves a few details (e.g., maxItems limits, required path) to the schema.

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 ('atomic commit that adds, updates, edits or deletes several files on a branch') and names the underlying mechanism (Git Data API) plus the downstream effect (CI/CD deploys). This distinguishes it from siblings like github_get_file, github_commit_image, and github_commit_attachment.

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 explicit per-mode routing: 'per file give exactly one of content ... edits ... or delete', and clarifies edits is 'right for large files such as a 300 KB content bundle'. It also explains createBranch and dryRun usage. It stops short of stating when to prefer this tool over the specialized siblings (image/attachment committers).

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