Skip to main content
Glama
Kong

Kong Konnect MCP Server

Official
by Kong

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

TableJSON Schema
NameRequiredDescriptionDefault
groupIdYesControl plane group ID (the ID of the control plane that acts as the group)
pageAfterNoCursor for pagination after a specific item
pageSizeNoNumber of members to return per page

Implementation Reference

  • 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;
  • 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" },
  • 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); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Kong/mcp-konnect'

If you have feedback or need assistance with the MCP directory API, please join our Discord server