Skip to content

Commit c54f39d

Browse files
Update pkg/github/context_tools.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 8d97b5e commit c54f39d

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
@@ -150,6 +150,14 @@ func GetMyTeams(getClient GetClientFn, getGQLClient GetGQLClientFn, t translatio
150150
if len(t) == 0 {
151151
return mcp.NewToolResultError("no teams found for user"), nil
152152
}
153+
// Check if any teams exist within the organizations
154+
teamCount := 0
155+
for _, org := range t {
156+
teamCount += len(org.Teams.Nodes)
157+
}
158+
if teamCount == 0 {
159+
return mcp.NewToolResultError("no teams found for user"), nil
160+
}
153161

154162
return MarshalledTextResult(t), nil
155163
})

0 commit comments

Comments
 (0)