Skip to main content
Glama

github_delete_file

Delete a file from any GitHub repository by committing the removal directly to a specified branch using the current file SHA.

Instructions

Delete a file from a repository via a commit.

Args: owner: Repository owner repo: Repository name path: File path to delete message: Commit message sha: Current file SHA (get from github_get_file) branch: Branch to commit to (empty = default branch) session_name: GitHub session to use

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shaYes
pathYes
repoYes
ownerYes
branchNo
messageYes
session_nameNodefault

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations, the description bears the full burden of disclosing behavioral traits. It mentions 'via a commit' but fails to explain that this permanently removes the file, that it creates a new commit, or that it requires appropriate permissions. This is especially notable for a destructive mutation tool, leaving the agent unaware of side effects or prerequisites beyond the SHA.

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 sentence followed by a neatly formatted parameter list. It is front-loaded with the core action, contains no filler, and each parameter line is concise and informative. Structure is consistent and scannable.

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?

For a destructive tool with no annotations, the description covers the basic operation and all parameters, but omits important context such as whether the commit is pushed, how branch protection is handled, or what the output schema contains (though output schema exists). The SHA hint provides a minimum prerequisite, but overall the behavioral gaps make it only partially complete.

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

Parameters5/5

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

The Args list provides a clear one-line explanation for every parameter, including the source for sha and the default behavior for branch. Since schema description coverage is 0%, this detailed parameter documentation fully compensates and adds meaningful semantics beyond the bare titles in the input schema.

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 action: 'Delete a file from a repository via a commit.' It specifies the resource (file) and the repository context, making the purpose unambiguous. It does not explicitly differentiate from sibling tools like github_create_file or github_update_file, but the distinct verb 'delete' is sufficient.

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 such as github_update_file or github_delete_repo. The only procedural hint—'sha: Current file SHA (get from github_get_file)'—is embedded in the parameter list and does not offer general usage direction or exclusions.

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