gitea_file_delete returns "repository file already exists" error #14
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
The
gitea_file_deletetool returns an incorrect error message when attempting to delete a file:This error makes no sense for a DELETE operation — it appears the tool may be hitting the wrong API endpoint or using the wrong HTTP method internally.
Steps to Reproduce
gitea_file_getgitea_file_deletewith correct owner, repo, filepath, sha, and messagerepository file already existsExample Call
Also tried with explicit
"branch": "main"— same error.Expected Behavior
File should be deleted and a commit created with the provided message.
Workaround Attempted
Using
gitea_api_requestwithDELETEmethod on the/contents/endpoint — this returnedjsontext: unexpected EOF(likely a 200 response with empty body that the MCP server can't parse). The file was NOT actually deleted.Branch created:
feature/14-