Skip to main content
Glama

create_or_update_file

Create a new file or update an existing file in a GitHub repository with a commit message, path, and content.

Instructions

Create or update a file in a repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shaNoThe blob SHA of the file being replaced. Required to update an existing file.
pathYes
repoYes
ownerYes
branchNoOptional branch name
contentYesFile content
messageYesCommit message
Behavior1/5

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

With no annotations provided, the description carries full responsibility for disclosing behavioral traits. It does not mention that updates require the sha parameter, that the operation commits changes, or any side effects. The description effectively restates the tool's name, offering no additional transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that front-loads the action and resource. While it is appropriately short, its brevity contributes to the lack of informative content, so it earns a 4 rather than 5.

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?

Given the tool's complexity (7 parameters, no annotations, no output schema), this one-sentence description is inadequate. It omits crucial context such as the commit behavior, the requirement of sha for updates, and any return value semantics. It barely covers the basic purpose.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema covers 57% of parameters with descriptions, and the description adds no parameter-related information. It does not clarify the critical distinction between create and update, such as the sha requirement for updates, nor does it explain the content format (e.g., base64). Since schema coverage is moderate and the description is silent, it fails to compensate for the gaps.

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?

The description clearly states the verb and resource ('Create or update a file'), which distinguishes it from sibling tools like delete_file and get_file_contents. However, it lacks explicit scope details such as the need for a commit or branch, but the purpose is unambiguous.

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

Usage Guidelines3/5

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

The description implies the use case (creating or updating a file) but provides no explicit guidance on when to prefer this tool over alternatives like delete_file or get_file_contents. There is no exclusion criteria or alternative naming, but the function's name itself suggests its usage.

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/shade-solutions/github-mcp-plus'

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