Add get_teams and get_team_members tools#834
Merged
mattdholloway merged 29 commits intomainfrom Aug 13, 2025
Merged
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
LuluBeatson
suggested changes
Aug 8, 2025
LuluBeatson
reviewed
Aug 11, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new get_teams tool to retrieve GitHub team memberships for users across their organizations.
- Introduces
GetTeamsfunction that uses both REST and GraphQL APIs to fetch team data - Adds comprehensive test coverage for the new tool including success, error, and edge cases
- Updates the default toolset to include the new teams tool in the context tools group
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/github/tools.go | Registers the new GetTeams tool in the context toolset |
| pkg/github/context_tools.go | Implements the GetTeams function with GraphQL querying logic |
| pkg/github/context_tools_test.go | Adds comprehensive test suite for the GetTeams functionality |
| pkg/github/toolsnaps/get_teams.snap | Tool snapshot for testing framework |
| README.md | Documents the new get_teams tool in the available tools section |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
get_teams toolget_teams and get_team_members tools
LuluBeatson
approved these changes
Aug 13, 2025
IrynaKulakova
approved these changes
Aug 13, 2025
nickytonline
pushed a commit
to nickytonline/github-mcp-http
that referenced
this pull request
Oct 4, 2025
* add team tool with tests * add to tools * add toolsnaps and docs * Update pkg/github/context_tools.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * rewrite to allow providing user * rRename get_my_teams to get_teams and update documentation and tests * remove old snap * rm old comments * update test teams to numbered examples * Update descriptions for allow finding teams of other users * return empty result over custom empty error * fix test expectations for no teams found * flatten teams response to not include Nodes * update description to include clarification about teams you are a member of * fix typo in tool desc * updated description to be more generic for accecss note * amended error handling * Update pkg/github/context_tools.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * add additional tool to get team members * update tool desc for get_team_members to include warning about auth * added new scope info * refactor to parse params individually * GetTeams - rename "login" field to "org" --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: LuluBeatson <lulubeatson@github.com> Co-authored-by: Lulu <59149422+LuluBeatson@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds two new tools in the context_tools toolset:
get_team_members - Get team members
org: Organization login (owner) that contains the team. (string, required)team_slug: Team slug (string, required)get_teams - Get teams
user: Username to get teams for. If not provided, uses the authenticated user. (string, optional)Closes: https://github.com/github/copilot-agent-services/issues/270 and #366