Skip to main content
Glama
Kong

Kong Konnect MCP Server

Official
by Kong

list_control_planes

Retrieve and filter a list of control planes in your organization by name, cluster type, labels, or cloud gateway capability. Supports pagination and sorting for efficient management.

Instructions

List all control planes in your organization.

INPUT:

  • pageSize: Number - Number of control planes per page (1-1000, default: 10)

  • pageNumber: Number (optional) - Page number to retrieve

  • filterName: String (optional) - Filter control planes by name

  • filterClusterType: String (optional) - Filter by cluster type (kubernetes, docker, etc.)

  • filterCloudGateway: Boolean (optional) - Filter by cloud gateway capability

  • labels: String (optional) - Filter by labels (format: 'key:value,existCheck')

  • sort: String (optional) - Sort field and direction (e.g. 'name,created_at desc')

OUTPUT:

  • metadata: Object - Contains pageSize, pageNumber, totalPages, totalCount, filters, sort

  • controlPlanes: Array - List of 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

    • controlPlaneEndpoint: String - URL endpoint for the control plane

    • telemetryEndpoint: String - URL endpoint for telemetry

    • hasCloudGateway: Boolean - Whether cloud gateway is enabled

    • labels: Object - Labels assigned to this control plane

    • metadata: Object - Creation and update timestamps

  • usage: Object - Information about how to use these results

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterCloudGatewayNoFilter by cloud gateway capability
filterClusterTypeNoFilter by cluster type (e.g., 'kubernetes', 'docker')
filterNameNoFilter control planes by name (contains)
labelsNoFilter by labels (format: 'key:value,existCheck')
pageNumberNoPage number to retrieve
pageSizeNoNumber of control planes per page
sortNoSort field and direction (e.g. 'name,created_at desc')

Implementation Reference

  • Core handler function that executes the tool logic: calls the Kong API to list control planes, transforms the response data into a standardized format with metadata, pagination info, and usage instructions.
    export async function listControlPlanes( api: KongApi, pageSize = 10, pageNumber?: number, filterName?: string, filterClusterType?: string, filterCloudGateway?: boolean, labels?: string, sort?: string ) { try { const result = await api.listControlPlanes( pageSize, pageNumber, filterName, filterClusterType, filterCloudGateway, labels, sort ); // Transform the response to have consistent field names return { metadata: { pageSize: pageSize, pageNumber: pageNumber || 1, totalPages: result.meta.page_count, totalCount: result.meta.total_count, filters: { name: filterName || null, clusterType: filterClusterType || null, cloudGateway: filterCloudGateway !== undefined ? filterCloudGateway : null, labels: labels || null }, sort: sort || null }, controlPlanes: result.data.map((cp: any) => ({ controlPlaneId: cp.id, name: cp.name, description: cp.description, type: cp.type, clusterType: cp.cluster_type, controlPlaneEndpoint: cp.control_plane_endpoint, telemetryEndpoint: cp.telemetry_endpoint, hasCloudGateway: cp.has_cloud_gateway, labels: cp.labels, metadata: { createdAt: cp.created_at, updatedAt: cp.updated_at } })), usage: { instructions: "Use the controlPlaneId from these results with other tools like list-services, list-data-plane-nodes, etc.", pagination: "For more results, increment pageNumber or increase pageSize" } }; } catch (error) { throw error; } }
  • src/tools.ts:67-73 (registration)
    Tool definition and registration object specifying the method name, human-readable name, description prompt, input parameters schema, and category.
    { method: "list_control_planes", name: "List Control Planes", description: prompts.listControlPlanesPrompt(), parameters: parameters.listControlPlanesParameters(), category: "control_planes" },
  • Dispatch handler in the MCP server that routes the 'list_control_planes' tool call to the specific controlPlanes.listControlPlanes function, passing the API instance and parsed arguments.
    case "list_control_planes": result = await controlPlanes.listControlPlanes( this.api, args.pageSize, args.pageNumber, args.filterName, args.filterClusterType, args.filterCloudGateway, args.labels, args.sort ); break;
  • Zod schema defining the input parameters for the list_control_planes tool, including pagination, filtering, and sorting options with descriptions and validation.
    export const listControlPlanesParameters = () => z.object({ pageSize: z.number().int() .min(1).max(1000) .default(10) .describe("Number of control planes per page"), pageNumber: z.number().int() .min(1) .optional() .describe("Page number to retrieve"), filterName: z.string() .optional() .describe("Filter control planes by name (contains)"), filterClusterType: z.string() .optional() .describe("Filter by cluster type (e.g., 'kubernetes', 'docker')"), filterCloudGateway: z.boolean() .optional() .describe("Filter by cloud gateway capability"), labels: z.string() .optional() .describe("Filter by labels (format: 'key:value,existCheck')"), sort: z.string() .optional() .describe("Sort field and direction (e.g. 'name,created_at desc')"), });

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