Skip to main content
Glama
GitHub MCP Server

GitHub MCP Server

create_commit

Creates or updates a file in an existing GitHub repository by committing complete file content with a commit message, enabling requested additions, modifications, or updates.

Instructions

Hace un commit en un repositorio EXISTENTE de GitHub creando un archivo nuevo o reemplazando el contenido de uno existente. Úsalo cuando el usuario pida agregar, crear, modificar o actualizar un archivo en un repositorio. El parámetro 'content' debe ser el contenido COMPLETO del archivo.

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": {
      "repo": "<repo>",
      "path": "<path>",
      "content": "<content>",
      "message": "<message>"
    },
    "name": "create_commit"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesRuta del archivo dentro del repo. Ej: 'README.md' o 'src/index.js'
repoYesNombre del repositorio donde se hará el commit
ownerNoUsuario u organización dueña del repositorio. Si se omite, se usa el usuario autenticado
branchNoRama donde hacer el commit. Si se omite, se usa la rama por defecto
contentYesContenido completo del archivo (texto plano)
messageYesMensaje del commit. Ej: 'docs: agrega guía de instalación'

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose the crucial behavior: it creates a new file OR replaces an existing file's content, and 'content' must be the COMPLETE file content, warning the agent against partial writes. It omits auth/permission requirements, concurrency or SHA handling, and what happens on a nonexistent file path or repo.

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: purpose first, trigger condition second, critical parameter constraint last. Nothing is wasted, and the emphasis on EXISTENTE and COMPLETO is targeted rather than decorative.

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, 6-parameter write tool with no annotations and no output schema, the description covers purpose, trigger, and overwrite semantics adequately. It could still note the authentication requirement and what the call returns (e.g., the resulting commit reference), which is left entirely unspecified.

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 100%, so the baseline is 3; the description adds real meaning by framing 'content' as a full replacement payload rather than a diff or patch, which changes how the agent should construct the value. It adds nothing about repo/path/branch semantics beyond the schema.

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?

States a concrete verb (hacer commit / crear o reemplazar un archivo) on a specific resource (GitHub repository file), and the capitalized 'EXISTENTE' implicitly routes the agent away from the sibling create_repository. It is clear on its own, though the contrast with siblings is only implicit rather than named.

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 trigger: use it when the user asks to add, create, modify, or update a file in a repository. It does not state when NOT to use it (e.g., editing via API vs. other file tools) or any preconditions such as authentication, so it stops short of full guidance.

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