Skip to main content
Glama

github_create_file

Create a new file in any GitHub repository by specifying the owner, repository, file path, content, and commit message. Adds the file directly to your chosen branch through a single commit.

Instructions

Create a new file in a repository via a commit.

Args: owner: Repository owner repo: Repository name path: File path to create (e.g., 'docs/guide.md') content: File content (will be base64-encoded automatically) message: Commit message branch: Branch to commit to (empty = default branch) session_name: GitHub session to use

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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 carries the burden of transparency. It discloses that content is base64-encoded automatically and that empty branch uses the default branch, but it does not cover behavior if the file already exists (e.g., failure vs overwrite) or authentication requirements.

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, starting with a one-sentence purpose statement followed by a well-organized parameter list. Every line contributes without unnecessary fluff.

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

Completeness3/5

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

The description is adequate for a straightforward mutation tool, especially since an output schema exists. However, it omits important edge-case behavior (what happens if the file exists) and does not differentiate when to use this over update_file. These gaps reduce completeness.

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?

The Args list provides descriptions for all parameters, adding value beyond the schema. It gives a concrete path example and clarifies base64 encoding, but some entries simply restate the parameter name without additional detail.

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 'Create a new file in a repository via a commit,' identifying the specific action and resource. This distinguishes it from sibling tools like update_file, delete_file, and get_file.

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?

No guidance is provided on when to use this tool versus alternatives like update_file. There is no mention of exclusions, prerequisites, or context in which this tool should be preferred.

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