Skip to content

Commit 5a3dbe1

Browse files
authored
Merge pull request #99 from linuxfoundation/feat/search-members-include-inactive
tools: replace active_only with include_inactive in search_members
2 parents 925ddea + 560b47c commit 5a3dbe1

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

internal/tools/member.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ type SearchMembersArgs struct {
4141
B2bOrgUID string `json:"b2b_org_uid,omitempty" jsonschema:"Filter by B2B organization UID. At least one of project_uid or b2b_org_uid is strongly recommended."`
4242
SearchName string `json:"search_name,omitempty" jsonschema:"Search memberships by member company name (typeahead)."`
4343
TierUID string `json:"tier_uid,omitempty" jsonschema:"Filter by exact tier+range UID (each employee-count range has a distinct UID)."`
44-
TierName string `json:"tier_name,omitempty" jsonschema:"Filter by exact tier product name, e.g. 'Silver ISV Member'. Must match the full name as stored."`
45-
ActiveOnly *bool `json:"active_only,omitempty" jsonschema:"When true (default), only return memberships with status Active. Set to false to include all statuses."`
46-
PageSize int `json:"page_size,omitempty" jsonschema:"Number of results per page (default 10, max 100)."`
44+
TierName string `json:"tier_name,omitempty" jsonschema:"Filter by exact tier product name, e.g. 'Silver ISV Member'. Must match the full name as stored."`
45+
IncludeInactive bool `json:"include_inactive,omitempty" jsonschema:"When true, include memberships with non-Active statuses (e.g. Purchased, Expired, Completed). Defaults to false (Active memberships only)."`
46+
PageSize int `json:"page_size,omitempty" jsonschema:"Number of results per page (default 10, max 100)."`
4747
PageToken string `json:"page_token,omitempty" jsonschema:"Opaque pagination token from a previous search response."`
4848
}
4949

@@ -191,7 +191,7 @@ func toKeyContactView(c *memberservice.ProjectKeyContactResponse) keyContactView
191191
func RegisterSearchMembers(server *mcp.Server) {
192192
mcp.AddTool(server, &mcp.Tool{
193193
Name: "search_members",
194-
Description: "List and search project memberships. At least one of project_uid or b2b_org_uid is strongly recommended — an unfiltered search across all memberships is unlikely to be useful. Defaults to active memberships only (active_only=true); set active_only=false to include all statuses. Supports search_name for company name typeahead, tier_name for exact tier product name filtering, tier_uid for exact tier+range filtering, and cursor-based pagination via page_token. Also accepts b2b_org_uid to list all memberships for a given org across all projects.",
194+
Description: "List and search project memberships. At least one of project_uid or b2b_org_uid is strongly recommended — an unfiltered search across all memberships is unlikely to be useful. Returns Active memberships by default; set include_inactive=true to also include memberships with other statuses (e.g. Purchased, Expired, Completed). Supports search_name for company name typeahead, tier_name for exact tier product name filtering, tier_uid for exact tier+range filtering, and cursor-based pagination via page_token. Also accepts b2b_org_uid to list all memberships for a given org across all projects.",
195195
Annotations: &mcp.ToolAnnotations{
196196
Title: "Search Members",
197197
ReadOnlyHint: true,
@@ -293,8 +293,8 @@ func handleSearchMembers(ctx context.Context, req *mcp.CallToolRequest, args Sea
293293
if args.TierName != "" {
294294
filtersAll = append(filtersAll, "tier_name:"+args.TierName)
295295
}
296-
// Default to active-only unless the caller explicitly sets active_only=false.
297-
if args.ActiveOnly == nil || *args.ActiveOnly {
296+
// Default to Active-only; include all statuses only when the caller opts in.
297+
if !args.IncludeInactive {
298298
filtersAll = append(filtersAll, "status:Active")
299299
}
300300
if len(filtersAll) > 0 {

0 commit comments

Comments
 (0)