Home / Servers / GitHub API / repos_delete_file
Delete a file
An MCP tool from the GitHub API server, hosted on mcp.hjlabs.in.
Delete a file Deletes a file in a repository. You can provide an additional committer parameter, which is an object containing information about the committer. Or, you can provide an author parameter, which is an… [DELETE /repos/{owner}/{repo}/contents/{path}]
Name on the gateway: github_api__repos_delete_file · may change things.
Parameters
| Name | Type | Description |
|---|---|---|
owner required | string | The account owner of the repository. The name is not case… |
repo required | string | The name of the repository without the .git extension. The… |
path required | string | path parameter |
message required | string | The commit message. |
sha required | string | The blob SHA of the file being deleted. |
branch | string | The branch name. Default: the repository’s default branch |
committer | object | object containing information about the committer. |
author | object | object containing information about the author. |
How to call it
Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:
{
"name": "github_api__repos_delete_file",
"arguments": {
"owner": "…",
"repo": "…",
"path": "…",
"message": "…",
"sha": "…"
}
}Or connect the GitHub API server directly, which lists 1,221 tools including this one:
claude mcp add --transport http hj-github-api https://mcp.hjlabs.in/mcp/github-api \
--header "Authorization: Bearer YOUR_API_KEY"Try asking
Use the delete a file tool with owner set to ….