@@ -557,6 +557,11 @@ func ForkRepository(getClient GetClientFn, t translations.TranslationHelperFunc)
557
557
}
558
558
559
559
// DeleteFile creates a tool to delete a file in a GitHub repository.
560
+ // This tool uses a more roundabout way of deleting a file than just using the client.Repositories.DeleteFile.
561
+ // This is because REST file deletion endpoint (and client.Repositories.DeleteFile) don't add commit signing to the deletion commit,
562
+ // unlike how the endpoint backing the create_or_update_files tool does. This appears to be a quirk of the API.
563
+ // The approach implemented here gets automatic commit signing when used with either the github-actions user or as an app,
564
+ // both of which suit an LLM well.
560
565
func DeleteFile (getClient GetClientFn ,t translations.TranslationHelperFunc ) (tool mcp.Tool ,handler server.ToolHandlerFunc ) {
561
566
return mcp .NewTool ("delete_file" ,
562
567
mcp .WithDescription (t ("TOOL_DELETE_FILE_DESCRIPTION" ,"Delete a file from a GitHub repository" )),