Skip to main content
Glama
wuqunfei

github-mcp-server-js

by wuqunfei

create_or_update_file

Create or update a file in a GitHub repository by specifying owner, repo, path, Base64 content, and commit message; include the blob SHA to overwrite an existing file.

Instructions

Create a new file or update an existing file in a GitHub repository. Docs: https://docs.github.com/en/rest/repos/contents#create-or-update-file-contents

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shaNoBlob SHA of the file being replaced, required when updating an existing file
pathYesPath to the file
repoYesRepository name
ownerYesRepository owner (user or organization login)
branchNoBranch to commit to (defaults to the default branch)
contentYesNew file content, Base64-encoded
messageYesCommit message
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions create/update but fails to disclose that the tool creates a commit directly, requires repository write access, or that updating requires the blob SHA. These important side effects are absent from the description itself.

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 a single clear sentence followed by a documentation URL. It is concise, front-loaded with the primary purpose, and contains no filler or redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutating tool with no annotations and no output schema, the description is too sparse. It does not explain the commit side effect, the need for write permissions, or what the API returns. The docs link is a useful reference but does not compensate for missing core behavioral context.

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 each parameter has a description (e.g., sha 'required when updating', content 'Base64-encoded'). The tool description adds no parameter-specific meaning, but the schema already covers this adequately. 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?

The description uses a specific verb and resource: 'Create a new file or update an existing file in a GitHub repository.' This clearly states the tool's function and distinguishes it from sibling tools such as get_file_contents (read-only) or create_branch (branch creation).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It merely states what it does, with no mention of prerequisites, exclusions, or better-suited alternatives. The docs URL is not integrated into usage directions.

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/wuqunfei/github-mcp-server-js'

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