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

NameTypeDescription
owner requiredstringThe account owner of the repository. The name is not case…
repo requiredstringThe name of the repository without the .git extension. The…
path requiredstringpath parameter
message requiredstringThe commit message.
sha requiredstringThe blob SHA of the file being deleted.
branchstringThe branch name. Default: the repository’s default branch
committerobjectobject containing information about the committer.
authorobjectobject 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:

call_tool arguments
{
  "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:

Run in your terminal
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 ….

More from GitHub API