Skip to main content
Glama

github_create_branch_commit

Destructive

[WRITE] Commit changes to one or more files as a single commit on a branch (the branch is created from the default branch if it doesn't exist). Refuses the repository's default branch: commit to a new branch, then open a pull request. Requires confirm:true.

Input Schema

NameRequiredDescriptionDefault
baseNoBranch to start a NEW branch from (optional; default branch)
repoYesRepository as owner/name, e.g. "octocat/hello-world" (a github.com URL works too)
filesYesThe files this commit writes or deletes
branchYesBranch to commit to, e.g. fix/login-timeout. Not the default branch.
confirmNoMust be true to actually do this on GitHub. Omit/false to refuse (safety gate).
messageYesCommit message

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the description earns credit for the extra context: auto-creation of the branch from the default branch, the hard refusal of the default branch, and the confirm:true safety gate. It does not spell out that file contents are overwritten wholesale (that only appears in the schema's 'COMPLETE new file content' note), which is the main remaining destructive-behavior detail.

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 tight sentences, front-loaded with the [WRITE] marker and the core action, then the branch-creation behavior, then the constraint and safety gate. No filler or repetition.

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 a destructive, open-world write tool, the description covers the critical call-correctness facts: branch auto-creation, default-branch refusal, and the confirm gate. Missing only return-value expectations (e.g. resulting commit SHA/branch URL), which is a modest gap given no output schema exists.

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 schema already documents repo, branch, base, message, files and confirm including the confirm safety gate. The description only reinforces the confirm requirement and the branch-creation semantics from base, adding little beyond the structured fields. Baseline 3 applies.

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 changes to one or more files as a single commit on a branch') with the scope of atomicity made explicit. It is clearly distinguishable from github_create_pr, github_get_file and github_comment among the siblings.

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 an explicit routing rule: it refuses the default branch, and the correct alternative workflow is 'commit to a new branch, then open a pull request'. That names both the exclusion and the follow-up tool path. It stops short of explicitly naming github_create_pr as the next call, hence 4 rather than 5.

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