Skip to main content
Glama
Kong

Kong Konnect MCP Server

Official
by Kong

list_control_planes

Retrieve and filter all control planes in your Kong Konnect organization with pagination, sorting, and detailed metadata.

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
pageSizeNoNumber of control planes per page
pageNumberNoPage number to retrieve
filterNameNoFilter control planes by name (contains)
filterClusterTypeNoFilter by cluster type (e.g., 'kubernetes', 'docker')
filterCloudGatewayNoFilter by cloud gateway capability
labelsNoFilter by labels (format: 'key:value,existCheck')
sortNoSort field and direction (e.g. 'name,created_at desc')

Implementation Reference

  • Core handler function that executes the list_control_planes tool by querying the Kong API and transforming the response into a standardized format with metadata, control planes list, 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 registration definition specifying the method name, description from prompts, parameters schema, and category.
    { method: "list_control_planes", name: "List Control Planes", description: prompts.listControlPlanesPrompt(), parameters: parameters.listControlPlanesParameters(), category: "control_planes" },
  • Zod schema defining input parameters for the list_control_planes tool including pagination, filtering, and sorting options.
    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')"), });
  • src/index.ts:111-122 (registration)
    Dispatch logic in the MCP server that routes the list_control_planes tool call to the controlPlanes.listControlPlanes handler.
    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;

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