Skip to main content
Glama

github_update_file

Update an existing file in a GitHub repository by creating a commit with new content. Requires the current file SHA to prevent overwriting conflicts, and supports specifying a target branch.

Instructions

Update an existing file in a repository via a commit.

You need the current file's SHA (get it from github_get_file).

Args: owner: Repository owner repo: Repository name path: File path to update content: New file content message: Commit message sha: Current file SHA (required to prevent conflicts) branch: Branch to commit to (empty = default branch) session_name: GitHub session to use

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shaYes
pathYes
repoYes
ownerYes
branchNo
contentYes
messageYes
session_nameNodefault

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description discloses that the operation creates a commit and that the SHA is required to prevent conflicts. However, it doesn't mention error behavior, permissions, or content encoding, which are relevant for a mutation tool.

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 and well-structured: a clear purpose sentence, a prerequisite note, and a compact parameter list. No unnecessary words or repetitions.

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 an 8-parameter mutation tool with no annotations, the description covers the key workflow (get SHA first) and parameter semantics. It omits some details like content encoding and conflict behavior, but the information provided is sufficient for basic usage.

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 description coverage is 0%, and the description compensates by listing all 8 parameters with concise meanings, including the critical SHA requirement and branch default behavior. It adds meaning beyond the bare schema titles, though it omits content encoding details.

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 'Update an existing file in a repository via a commit.' The verb 'Update' plus the resource 'existing file' distinguishes it from sibling tools like github_create_file and github_delete_file.

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?

The description explicitly instructs the user to obtain the current file's SHA from github_get_file first, providing a clear prerequisite and workflow. It doesn't explicitly contrast with create_file, but 'existing file' implies when it should be used.

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/Pawangunjkar/github-mcp'

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