> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ravenna.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent tools

> Use GitHub Access agent tools in Ravenna rules to look up members and teams, send and cancel invitations, change organization roles, and manage GitHub teams.

GitHub Access provides agent tools for GitHub organization and team management. Reference them in agent rules (Natural language instructions defining agent behavior) using @ mentions so your agent can answer GitHub access questions and make changes without a handoff. Ravenna Assistant uses the same tools.

People are passed by email. If the agent only has a name, it finds the email with `@User Lookup` first. Teams are passed by name or slug.

***

## Look up members and teams

> [accordion] Get member
>
> Looks up a person's account in the GitHub organization: their GitHub username, organization role, and whether the membership is active or a pending invitation.
>
> **Tool name:** `@Get GitHub Member`
>
> **Input fields:**
>
> * `user_email` (required) - the person to look up.
>
> **Output data:**
>
> * `login` - GitHub username.
> * `name` - public profile name.
> * `org_role` - `ADMIN` (owner) or `MEMBER`.
>
> **Common use cases:**
>
> * Check whether someone is already in the organization before inviting them
> * Confirm a person's current role before changing it

> [accordion] List pending invitations
>
> Lists invitations to the organization that haven't been accepted yet, newest first, up to 50.
>
> **Tool name:** `@List Pending GitHub Invitations`
>
> **Output data:**
>
> * `invitations` - each invitation's `id`, `email` or `login`, `role`, and `invited_at`.
>
> **Common use cases:**
>
> * Check whether someone was already invited
> * Find the invitation to cancel

> [accordion] List teams
>
> Lists the organization's teams, up to 50.
>
> **Tool name:** `@List GitHub Teams`
>
> **Input fields:**
>
> * `search` - only teams whose name or slug matches.
>
> **Output data:**
>
> * `teams` - each team's `name` and `slug`.
>
> **Common use cases:**
>
> * Find the exact team name before adding or removing someone

> [accordion] List team members
>
> Lists a team's members with their GitHub username and team role, up to 100.
>
> **Tool name:** `@List GitHub Team Members`
>
> **Input fields:**
>
> * `team_name` (required) - name or slug of the team.
> * `include_child_teams` - also list people who are on the team through a child team.
>
> **Output data:**
>
> * `members` - each member's `login` and `role` (`MAINTAINER` or `MEMBER`).
>
> **Common use cases:**
>
> * Answer "who has access to this team's repositories?"
> * Find a team's maintainers to route an approval

> [accordion] List teams for user
>
> Lists the GitHub teams a person is on, up to 50.
>
> **Tool name:** `@List GitHub Teams for User`
>
> **Input fields:**
>
> * `user_email` (required) - the person.
> * `search` - only teams whose name or slug contains this text.
>
> **Output data:**
>
> * `teams` - each team's `name` and `slug`.
>
> **Common use cases:**
>
> * Explain which repositories someone can reach through their teams

> [accordion] Check team membership
>
> Checks whether a person is on a team, directly or through a child team, and with which role. A pending membership means they haven't accepted the organization invitation yet, so they have no access.
>
> **Tool name:** `@Check GitHub Team Membership`
>
> **Input fields:**
>
> * `user_email` (required) - the person to check.
> * `team_name` (required) - name or slug of the team.
>
> **Output data:**
>
> * `is_member` - `true` only for an active membership.
>
> **Common use cases:**
>
> * Check before adding or removing someone so the agent reports what actually changed

***

## Manage members

> [accordion] Invite member
>
> Invites a person to the organization by email, optionally straight into teams. They become a member once they accept the email from GitHub. A team that can't be found is skipped and listed in `skipped_teams`; the invitation still goes out.
>
> **Tool name:** `@Invite GitHub Member`
>
> **Input fields:**
>
> * `email` (required) - who is invited.
> * `role` - `MEMBER` (default), or `ADMIN` to make them an owner.
> * `team_names` - teams they join once they accept.
>
> **Common use cases:**
>
> * Invite a new engineer during onboarding
> * Invite someone who requested access to a team's repositories
>
> **Example rule:**
>
> When someone asks for access to a GitHub team, use @Get GitHub Member to check whether they're in the organization. If they aren't, use @Invite GitHub Member with that team in team\_names and tell them to accept the email from GitHub. If they are, use @Add User to GitHub Team.
>
> When someone asks for access to a GitHub team, use @Get GitHub Member
> to check whether they're in the organization. If they aren't, use
> @Invite GitHub Member with that team in team\_names and tell them to
> accept the email from GitHub. If they are, use @Add User to GitHub Team.

> [accordion] Cancel invitation
>
> Cancels a pending invitation to the organization.
>
> **Tool name:** `@Cancel GitHub Invitation`
>
> **Input fields:**
>
> * `email` - the email the invitation was sent to.
> * `invitation_id` - the invitation's id from `@List Pending GitHub Invitations`. Required for an invitation sent to a GitHub username, which has no email.
>
> **Common use cases:**
>
> * Withdraw an invitation sent to the wrong address

> [accordion] Set organization role
>
> Makes a member an owner (`ADMIN`), or turns an owner back into a member (`MEMBER`). Owners have full control of the organization, its settings, and every repository.
>
> **Tool name:** `@Set GitHub Organization Role`
>
> **Input fields:**
>
> * `user_email` (required) - whose role changes.
> * `role` (required) - `ADMIN` or `MEMBER`.
>
> **Common use cases:**
>
> * Grant temporary owner rights after approval
> * Remove owner rights during a role change

> [accordion] Remove member
>
> Removes a person from the organization. They lose access to every organization repository and leave all of its teams.
>
> **Tool name:** `@Remove GitHub Member`
>
> **Input fields:**
>
> * `user_email` (required) - who is removed.
>
> **Common use cases:**
>
> * Remove GitHub access during offboarding

***

## Manage teams

> [accordion] Add user to team
>
> Adds a person to a team, which grants them the team's repository access. For someone already on the team, it changes their role. The person needs a linked GitHub account and an active organization membership. See [who can be added to a team](https://docs.ravenna.ai/integrations/github/access-provisioning.md).
>
> **Tool name:** `@Add User to GitHub Team`
>
> **Input fields:**
>
> * `user_email` (required) - who is added.
> * `team_name` (required) - name or slug of the team.
> * `role` - `MEMBER` (default), or `MAINTAINER` to let them manage the team.
>
> **Common use cases:**
>
> * Grant repository access by adding someone to the right team
> * Make someone a team maintainer
>
> **Example rule:**
>
> When someone asks for access to a GitHub repository, use @List GitHub Teams to find the team that owns it, then use @Check GitHub Team Membership. If they're not on it, use @Add User to GitHub Team and confirm what access the team grants.
>
> When someone asks for access to a GitHub repository, use @List GitHub
> Teams to find the team that owns it, then use @Check GitHub Team
> Membership. If they're not on it, use @Add User to GitHub Team and
> confirm what access the team grants.

> [accordion] Remove user from team
>
> Removes a person from a team. They lose the team's repository access unless another team grants it. Only direct membership can be removed: someone on the team through a child team has to be removed from that child team.
>
> **Tool name:** `@Remove User from GitHub Team`
>
> **Input fields:**
>
> * `user_email` (required) - who is removed.
> * `team_name` (required) - name or slug of the team.
>
> **Common use cases:**
>
> * Take away team access when someone changes roles

> [accordion] Create team
>
> Creates a team in the organization.
>
> **Tool name:** `@Create GitHub Team`
>
> **Input fields:**
>
> * `team_name` (required) - the new team's name.
> * `description` - what the team is for.
> * `privacy` - `closed` (default) is visible to every organization member; `secret` only to its members and owners.
>
> **Output data:**
>
> * `team_name` - the created team.
>
> **Common use cases:**
>
> * Create a team for a new project from a request

> [accordion] Update team
>
> Renames a team or changes its description. Renaming also changes the team slug, which breaks @mentions and CODEOWNERS entries that use the old one.
>
> **Tool name:** `@Update GitHub Team`
>
> **Input fields:**
>
> * `team_name` (required) - current name or slug of the team.
> * `new_name` - the team's new name.
> * `description` - the team's new description.
>
> **Common use cases:**
>
> * Rename a team after a reorganization

> [accordion] Delete team
>
> Deletes a team. GitHub also deletes its child teams, and every member loses the repository access those teams granted.
>
> **Tool name:** `@Delete GitHub Team`
>
> **Input fields:**
>
> * `team_name` (required) - name or slug of the team.
>
> **Common use cases:**
>
> * Remove teams for finished projects

> [!NOTE]
>
> When Ravenna Assistant adds **Invite GitHub Member**, **Add User to GitHub Team**, or **Set GitHub Organization Role** to a rule, it asks how the tool should run. See [tool execution policies](https://docs.ravenna.ai/documentation/agents/tools.md#tool-execution-policies).

***

## Setup

**1. Connect GitHub Access**

Follow the [GitHub Access setup guide](https://docs.ravenna.ai/integrations/github/setup.md).

**2. Check the agent's tools**

Open your agent's settings and confirm the GitHub tools appear under **Tools**. A disconnected integration shows a warning instead.

**3. Write a rule**

Reference the tools with @ mentions in a rule (Natural language instructions defining agent behavior), then test it on a real access request.

***

## Best practices

* **Check before changing.** Pair `@Get GitHub Member` or `@Check GitHub Team Membership` with the change tools so the agent reports what actually changed.
* **Find the exact team first.** Use `@List GitHub Teams` before adding or removing someone, so the agent uses the exact team name.
* **Grant access through teams.** Repository access comes from teams, so add people to the team that owns the repository.
* **Gate the destructive tools.** Put `@Remove GitHub Member`, `@Delete GitHub Team`, and `@Set GitHub Organization Role` behind **Requires approval** in any rule an agent can reach on its own.

Learn more about [configuring agents](https://docs.ravenna.ai/documentation/agents/overview.md#the-agent-page) and [GitHub workflow actions](https://docs.ravenna.ai/integrations/github/workflows.md)


## Related topics

- [Agent tools](https://docs.ravenna.ai/integrations/omnissa/agent-tools.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.