Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 30, 2025

The get_teams and get_team_members tools were only accessible through the context toolset, making them difficult to discover when working with organizations.

Changes

  • Toolset registration: Added GetTeams and GetTeamMembers to the orgs toolset alongside existing SearchOrgs
  • Documentation: Auto-generated README now lists both tools under Organizations section
  • Backward compatibility: Tools remain in context toolset

Users can now access team-related functionality through either:

--toolsets=orgs        # for organization-focused workflows
--toolsets=context     # for user context (existing behavior)

The tools themselves are unchanged; this only improves their discoverability by making them available through the organization-related toolset.

Original prompt

Add the option to list team members of an org team


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits October 30, 2025 17:35
Co-authored-by: steffen <6301+steffen@users.noreply.github.com>
Co-authored-by: steffen <6301+steffen@users.noreply.github.com>
Copilot AI changed the title [WIP] Add option to list team members of organization team Add team tools to orgs toolset Oct 30, 2025
Copilot AI requested a review from steffen October 30, 2025 17:39
Copilot finished work on behalf of steffen October 30, 2025 17:39
@steffen steffen marked this pull request as ready for review October 30, 2025 19:05
@steffen steffen requested a review from a team as a code owner October 30, 2025 19:05
Copilot AI review requested due to automatic review settings October 30, 2025 19:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds two new team-related tools to the GitHub Organizations toolset: GetTeams and GetTeamMembers. These tools enable retrieving team information for authenticated users and listing team members for specific organization teams. The PR also cleans up an unused dependency reference for go-github/v74.

  • Added GetTeams and GetTeamMembers tools to the Organizations toolset
  • Added the same tools to the Context toolset
  • Updated documentation to describe the new tools
  • Removed unused go-github/v74 dependency entry from go.sum

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
pkg/github/tools.go Added GetTeams and GetTeamMembers tools to both the orgs and contextTools toolsets
go.sum Removed unused github.com/google/go-github/v74 dependency entries
README.md Added documentation for the two new tools in the Organizations section

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- `org`: Organization login (owner) that contains the team. (string, required)
- `team_slug`: Team slug (string, required)

- **get_teams** - Get teams
Copy link

Copilot AI Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation for get_teams is incomplete and inconsistent with the actual tool description. Based on the code in context_tools.go, this tool retrieves teams that the user is a member of, limited to organizations accessible with current credentials. The documentation should clarify this behavior and mention the organization-scoped nature of the results.

Suggested change
- **get_teams** - Get teams
- **get_teams** - Get teams that the user is a member of, limited to organizations accessible with current credentials. Results are organization-scoped.

Copilot uses AI. Check for mistakes.
@steffen
Copy link

steffen commented Oct 30, 2025

I was looking for the capability to get team members and was looking in the orgs toolset and couldn't find it.
Only through this pull request I found out it's in the context toolset.

Not sure if we want to have two tools in two different toolsets or even move it to the other toolset. (Not sure if this would break anything.)
Feel free to close this pull request if you think if should leave it as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants