list_control_plane_group_memberships
List all control planes that are members of a specific control plane group in Kong Konnect. Use this tool to view group membership details, including status and configuration information.
Instructions
List all control planes that are members of a specific control plane group.
INPUT:
groupId: String - ID of the control plane group (control plane that acts as the group)
pageSize: Number - Number of members to return per page (1-1000, default: 10)
pageAfter: String (optional) - Cursor for pagination after a specific item
OUTPUT:
metadata: Object - Contains groupId, pageSize, pageAfter, nextPageAfter, totalCount
members: Array - List of member control planes with details for each including:
controlPlaneId: String - Unique identifier for the control plane
name: String - Display name of the control plane
description: String - Description of the control plane
type: String - Type of the control plane
clusterType: String - Underlying cluster type
membershipStatus: Object - Group membership status including:
status: String - Current status (OK, CONFLICT, etc.)
message: String - Status message
conflicts: Array - List of configuration conflicts if any
metadata: Object - Creation and update timestamps
relatedTools: Array - List of related tools for group management
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| groupId | Yes | Control plane group ID (the ID of the control plane that acts as the group) | |
| pageSize | No | Number of members to return per page | |
| pageAfter | No | Cursor for pagination after a specific item |
Implementation Reference
- src/operations/controlPlanes.ts:109-152 (handler)Core handler function that executes the tool logic: calls the Kong API to list group memberships, transforms the raw API response into a standardized format with metadata, member details, status info, and related tool suggestions.export async function listControlPlaneGroupMemberships( api: KongApi, groupId: string, pageSize = 10, pageAfter?: string ) { try { const result = await api.listControlPlaneGroupMemberships(groupId, pageSize, pageAfter); // Transform the response to have consistent field names return { metadata: { groupId: groupId, pageSize: pageSize, pageAfter: pageAfter || null, nextPageAfter: result.meta?.next_page?.after || null, totalCount: result.meta?.total_count || 0 }, members: result.data.map((member: any) => ({ controlPlaneId: member.id, name: member.name, description: member.description, type: member.type, clusterType: member.cluster_type, membershipStatus: { status: member.cp_group_member_status?.status, message: member.cp_group_member_status?.message, conflicts: member.cp_group_member_status?.conflicts || [] }, metadata: { createdAt: member.created_at, updatedAt: member.updated_at } })), relatedTools: [ "Use get-control-plane-group-status to check for configuration conflicts", "Use check-control-plane-group-membership to verify if a specific control plane is a member", "Use get-control-plane to get more details about a specific member" ] }; } catch (error) { throw error; } }
- src/tools.ts:82-86 (registration)Tool registration metadata: defines the method name, display name, description prompt, input parameters schema, and category used by the MCP server to register this tool.method: "list_control_plane_group_memberships", name: "List Control Plane Group Memberships", description: prompts.listControlPlaneGroupMembershipsPrompt(), parameters: parameters.listControlPlaneGroupMembershipsParameters(), category: "control_planes"
- src/parameters.ts:149-159 (schema)Zod schema defining input parameters for the tool: groupId (required), pageSize (with defaults and constraints), pageAfter (optional pagination cursor).export const listControlPlaneGroupMembershipsParameters = () => z.object({ groupId: z.string() .describe("Control plane group ID (the ID of the control plane that acts as the group)"), pageSize: z.number().int() .min(1).max(1000) .default(10) .describe("Number of members to return per page"), pageAfter: z.string() .optional() .describe("Cursor for pagination after a specific item"), });
- src/index.ts:131-137 (handler)MCP server tool dispatcher case: receives validated args from MCP framework and delegates to the core operations handler.case "list_control_plane_group_memberships": result = await controlPlanes.listControlPlaneGroupMemberships( this.api, args.groupId, args.pageSize, args.pageAfter );
- src/api.ts:137-145 (helper)API client helper: constructs the HTTP endpoint and makes authenticated request to Kong Konnect API for group memberships data.async listControlPlaneGroupMemberships(groupId: string, pageSize = 10, pageAfter?: string): Promise<any> { let endpoint = `/control-planes/${groupId}/group-memberships?page[size]=${pageSize}`; if (pageAfter) { endpoint += `&page[after]=${pageAfter}`; } return this.kongRequest<any>(endpoint); }