Skip to content

Commit 8bc6489

Browse files
committed
Merge branch 'teams-tool' of https://github.com/github/github-mcp-server into teams-tool
2 parents 661daff + c54f39d commit 8bc6489

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/github/context_tools.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,14 @@ func GetMyTeams(getClient GetClientFn, getGQLClient GetGQLClientFn, t translatio
161161
if len(t) == 0 {
162162
return mcp.NewToolResultError("no teams found for user"), nil
163163
}
164+
// Check if any teams exist within the organizations
165+
teamCount := 0
166+
for _, org := range t {
167+
teamCount += len(org.Teams.Nodes)
168+
}
169+
if teamCount == 0 {
170+
return mcp.NewToolResultError("no teams found for user"), nil
171+
}
164172

165173
return MarshalledTextResult(t), nil
166174
})

0 commit comments

Comments
 (0)