delete_file
Remove files from GitHub repositories by specifying the file path, commit message, and SHA. This tool helps manage repository content through automated deletion operations.
Instructions
Delete a file from a repository.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"owner": "<owner>",
"repo": "<repo>",
"path": "<path>",
"message": "<message>",
"sha": "<sha>"
},
"name": "delete_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | Repository owner | |
| repo | Yes | Repository name | |
| path | Yes | File path to delete | |
| message | Yes | Commit message | |
| sha | Yes | Current blob SHA of the file (get it from get_file_contents) | |
| branch | No | Branch name (defaults to default branch) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |