{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method).\"\n\n> [!NOTE]\n> You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.\n\nFor more information about the permission levels, see \"[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)\".","properties":{"path":{"type":"object","properties":{"org":{"type":"string","description":"The organization name. The name is not case sensitive."},"team_slug":{"type":"string","description":"The slug of the team name."},"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."}},"required":["org","team_slug","owner","repo"],"additionalProperties":false},"body":{"type":"object","properties":{"permission":{"type":"string","description":"The permission to grant the team on this repository. We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository."}},"examples":[{"permission":"push"}]}},"required":["path"],"additionalProperties":false},"name":"Add or update team repository permissions","id":"github.teams.add-or-update-repo-permissions-in-org","example":{"path":{"org":"example","team_slug":"example","owner":"octocat","repo":"hello-world"}},"maxRequests":1,"summary":false}}