Skip to main content
Glama
GitHub MCP Server

GitHub MCP Server

by rominababiel

create_commit

Commits a single text file to a GitHub repository, adding it or fully replacing existing content. Requires the complete final file content and a commit message.

Instructions

Hace un commit que agrega o reemplaza un único archivo de texto en un repositorio. Si el archivo existe se sobrescribe por completo, así que content debe traer el contenido final entero. Para commitear en una rama nueva, crearla antes con create_branch.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "owner": "<owner>",
      "repo": "<repo>",
      "path": "<path>",
      "content": "<content>",
      "message": "<message>"
    },
    "name": "create_commit"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesRuta del archivo desde la raíz del repositorio. Ejemplo: docs/guia.md.
repoYesNombre de un repositorio existente, sin el dueño. Ejemplo: mi-proyecto.
ownerYesUsuario u organización dueña del repositorio. Si no se conoce, obtenerla con list_repositories o health_check.
branchNoRama existente donde commitear. Omitir para usar la rama por defecto.
contentYesContenido completo final del archivo en texto. Reemplaza al contenido anterior si el archivo ya existe.
messageYesMensaje del commit que explique el cambio.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false; the description goes further by disclosing destructive overwrite semantics ('se sobrescribe por completo') and warning that content must be the complete final file. It does not discuss authentication, error behavior, or result shape, which keeps it at 4.

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 short sentences ordered by importance: what the tool does, the destructive overwrite caveat, then the branch prerequisite. No filler and nothing duplicated.

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 single-file commit mutation with full schema coverage and no output schema, the description covers scope, overwrite risk, and the new-branch prerequisite. Only failure modes and default-branch behavior are left unaddressed, which the schema partially handles.

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 all six parameters are already documented in the schema, including content's replace-existing semantics. The description restates content and branch behavior but adds no new parameter meaning, matching the baseline 3.

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: creates a commit that adds or replaces a single text file in a repository. The 'único archivo' scope plus the explicit pointer to create_branch makes it distinguishable from the list/creation siblings 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 concrete usage context: to commit on a new branch, run create_branch first. It stops short of any explicit when-not-to-use or exclusion, so it lands below the top band.

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