Skip to main content
Glama

push_files

Push one or more files to a GitHub branch in a single commit, automatically creating the branch if it doesn't exist. Files at the same paths are replaced; others are untouched.

Instructions

Commit one or more files to a branch in a single commit and push it — the core write tool. Creates the branch automatically (from base_branch or the default branch) if it doesn't exist. Existing files at the same paths are replaced; other files are untouched. Never force-pushes. File contents must be UTF-8 text. ALWAYS show the user which files and which branch, and get their approval before calling. Prefer a feature branch over pushing directly to the default branch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesRepository name (without owner)
filesYesFiles to create or replace in this commit
ownerNoRepo owner; defaults to GITHUB_DEFAULT_OWNER
branchYesBranch to commit to (created if missing)
messageYesCommit message
base_branchNoBranch to fork from when `branch` doesn't exist yet (default: repo default branch)
delete_pathsNoPaths to delete in the same commit
Behavior5/5

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

The description goes well beyond annotations by disclosing that existing files at the same paths are replaced, branches are auto-created from base_branch or default, force-push is never used, and contents must be UTF-8 text. These are critical behavioral traits not evident from structured fields.

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?

The description is concise yet dense, with each sentence adding unique value (core purpose, branch creation, replacement semantics, safety constraints, approval requirement, branch preference). It is front-loaded and well-structured.

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 write tool with no output schema and 7 parameters, the description covers all essential aspects: branch handling, file replacement, encoding constraint, no force-push, and user approval. It is complete despite the tool's complexity.

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 coverage is 100%, so the baseline is 3. The description adds some context (e.g., branch auto-creation from base_branch) but mostly restates what the schema already documents. It does not provide additional syntax or format details for parameters beyond 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?

The description clearly states the tool commits one or more files to a branch in a single commit and pushes it. It uses a specific verb ('commit and push'), names the resource ('files', 'branch'), and distinguishes itself from siblings like create_branch by emphasizing the core write operation.

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?

Provides clear when-to-use context: it is the core write tool, and instructs to prefer a feature branch over the default branch and to get user approval before calling. It implies alternatives (e.g., create_branch for branch-only tasks) but does not explicitly name them, so it misses the 'when-not-to-use' distinctiveness.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/iiinigence/github-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server