Skip to main content
Glama
Kong

Kong Konnect MCP Server

Official
by Kong

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

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

Implementation Reference

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

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the tool as a list operation, implying it is read-only and non-destructive, and includes details on pagination behavior (pageSize, pageAfter) and output structure. However, it lacks information on permissions, rate limits, or error handling, which are important for a tool that likely interacts with a management system.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (INPUT, OUTPUT) and uses bullet points for readability. It is appropriately sized for the tool's complexity, though some sentences in the OUTPUT section could be more concise. Overall, it efficiently conveys necessary information without unnecessary fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 parameters, no annotations, no output schema), the description is reasonably complete. It explains the purpose, input parameters, and output structure in detail. However, it lacks context on prerequisites (e.g., authentication) and does not reference sibling tools, which could enhance completeness for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description repeats parameter information from the schema (e.g., groupId, pageSize, pageAfter) but does not add significant meaning beyond what is in the schema, such as examples or edge cases. The baseline score of 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'List' and the resource 'all control planes that are members of a specific control plane group', which is specific and unambiguous. However, it does not explicitly differentiate from sibling tools like 'list_control_planes' or 'check_control_plane_group_membership', which might have overlapping or related functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention sibling tools like 'check_control_plane_group_membership' for checking individual memberships or 'list_control_planes' for listing all control planes, leaving the agent to infer usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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