check_control_plane_group_membership
Verify if a control plane belongs to any group by providing its ID. Returns membership details, including group ID, name, status, and any configuration conflicts.
Instructions
Check if a control plane is a member of any group.
INPUT:
controlPlaneId: String - ID of the control plane to check
OUTPUT:
controlPlaneId: String - ID of the control plane that was checked
groupMembership: Object - Membership information including:
isMember: Boolean - Whether the control plane is a member of any group
groupId: String - ID of the group this control plane belongs to (if any)
groupName: String - Name of the group this control plane belongs to
status: String - Membership status (OK, CONFLICT, etc.)
message: String - Status message
conflicts: Array - List of configuration conflicts if any
relatedTools: Array - List of related tools for group management
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| controlPlaneId | Yes | Control plane ID to check (can be obtained from list-control-planes tool) |
Implementation Reference
- src/operations/controlPlanes.ts:157-184 (handler)The main handler function that executes the core logic of the tool: calls the Kong API to check if a control plane is a member of a group, transforms and structures the response.export async function checkControlPlaneGroupMembership( api: KongApi, controlPlaneId: string ) { try { const result = await api.checkControlPlaneGroupMembership(controlPlaneId); // Transform the response to have consistent field names const membership = result.data; return { controlPlaneId: controlPlaneId, groupMembership: { isMember: membership.is_member, groupId: membership.group_id, groupName: membership.group_name, status: membership.status, message: membership.message, conflicts: membership.conflicts || [] }, relatedTools: [ "Use list-control-plane-group-memberships to see all members of this group", "Use get-control-plane to get more details about this control plane" ] }; } catch (error) { throw error; } }
- src/index.ts:140-145 (registration)MCP tool handler dispatch: registers the tool and routes calls to the specific controlPlanes handler function.case "check_control_plane_group_membership": result = await controlPlanes.checkControlPlaneGroupMembership( this.api, args.controlPlaneId ); break;
- src/tools.ts:88-94 (registration)Tool definition used for MCP registration, including method name, description prompt, and parameters schema reference.{ method: "check_control_plane_group_membership", name: "Check Control Plane Group Membership", description: prompts.checkControlPlaneGroupMembershipPrompt(), parameters: parameters.checkControlPlaneGroupMembershipParameters(), category: "control_planes" }
- src/parameters.ts:161-164 (schema)Zod schema defining the input parameters (controlPlaneId) for validation.export const checkControlPlaneGroupMembershipParameters = () => z.object({ controlPlaneId: z.string() .describe("Control plane ID to check (can be obtained from list-control-planes tool)"), });
- src/api.ts:147-149 (helper)API client helper method that performs the actual HTTP request to Kong Konnect's group member status endpoint.async checkControlPlaneGroupMembership(controlPlaneId: string): Promise<any> { return this.kongRequest<any>(`/control-planes/${controlPlaneId}/group-member-status`); }