{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Renames a branch in a repository.\n\n> [!NOTE]\n> Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see \"[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)\".\n\nThe authenticated user must have push access to the branch. If the branch is the default branch, the authenticated user must also have admin or owner permissions.\n\nIn order to rename the default branch, fine-grained access tokens also need the `administration:write` repository permission.","properties":{"path":{"type":"object","properties":{"owner":{"type":"string","description":"The account owner of the repository. The name is not case sensitive."},"repo":{"type":"string","description":"The name of the repository without the `.git` extension. The name is not case sensitive."},"branch":{"type":"string","description":"The name of the branch. Cannot contain wildcard characters. To use wildcard characters in branch names, use [the GraphQL API](https://docs.github.com/graphql)."}},"required":["owner","repo","branch"],"additionalProperties":false},"body":{"type":"object","properties":{"new_name":{"type":"string","description":"The new name of the branch."}},"required":["new_name"],"examples":[{"new_name":"my_renamed_branch"}]}},"required":["path","body"],"additionalProperties":false},"name":"Rename a branch","id":"github.repos.rename-branch","example":{"path":{"owner":"octocat","repo":"hello-world","branch":"example"},"body":{"new_name":"my_renamed_branch"}},"maxRequests":1,"summary":false}}