list_control_plane_group_memberships
Retrieve details of all control planes within a specific group, including IDs, names, types, and membership status. Use groupId and pagination parameters to manage and inspect control plane configurations efficiently.
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) | |
| pageAfter | No | Cursor for pagination after a specific item | |
| pageSize | No | Number of members to return per page |
Implementation Reference
- src/operations/controlPlanes.ts:109-152 (handler)The primary handler function that executes the tool's logic: calls the API endpoint and transforms the raw API response into a structured format with metadata, member details, 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/index.ts:131-138 (registration)Tool dispatch/registration in the MCP server's tool handler switch statement, which routes the tool invocation to the specific controlPlanes handler function.case "list_control_plane_group_memberships": result = await controlPlanes.listControlPlaneGroupMemberships( this.api, args.groupId, args.pageSize, args.pageAfter ); break;
- src/parameters.ts:149-159 (schema)Zod schema defining the input parameters for the tool, including validation and descriptions.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/tools.ts:81-87 (registration)Tool metadata definition including method name, human-readable name, description prompt, parameter schema reference, and category, used by the MCP server registration.{ method: "list_control_plane_group_memberships", name: "List Control Plane Group Memberships", description: prompts.listControlPlaneGroupMembershipsPrompt(), parameters: parameters.listControlPlaneGroupMembershipsParameters(), category: "control_planes" },
- src/api.ts:137-145 (helper)Low-level API client method that constructs the HTTP request to the Kong API endpoint for listing group memberships.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); }