list_plugins
Retrieve and manage all plugins linked to a control plane in Kong Konnect. Specify control plane ID, pagination size, and offset to view detailed plugin configurations, status, and scope.
Instructions
List all plugins associated with a control plane.
INPUT:
controlPlaneId: String - ID of the control plane
size: Number - Number of plugins to return (1-1000, default: 100)
offset: String (optional) - Pagination offset token from previous response
OUTPUT:
metadata: Object - Contains controlPlaneId, size, offset, nextOffset, totalCount
plugins: Array - List of plugins with details for each including:
pluginId: String - Unique identifier for the plugin
name: String - Name of the plugin (e.g., rate-limiting, cors, etc.)
enabled: Boolean - Whether the plugin is enabled
config: Object - Plugin-specific configuration
protocols: Array - Protocols this plugin applies to
tags: Array - Tags associated with the plugin
scoping: Object - Defines plugin scope including:
consumerId: String - Consumer this plugin applies to (if any)
serviceId: String - Service this plugin applies to (if any)
routeId: String - Route this plugin applies to (if any)
global: Boolean - Whether this is a global plugin
metadata: Object - Creation and update timestamps
relatedTools: Array - List of related tools for plugin configuration
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| controlPlaneId | Yes | Control Plane ID (obtainable from list-control-planes tool) | |
| offset | No | Offset token for pagination (from previous response) | |
| size | No | Number of plugins to return |
Implementation Reference
- src/operations/configuration.ts:155-199 (handler)Core handler function that executes the list_plugins tool logic: fetches plugins from Kong API, transforms response with standardized fields including scoping information, adds metadata and related tools suggestions.export async function listPlugins( api: KongApi, controlPlaneId: string, size = 100, offset?: string ) { try { const result = await api.listPlugins(controlPlaneId, size, offset); // Transform the response to have consistent field names return { metadata: { controlPlaneId: controlPlaneId, size: size, offset: offset || null, nextOffset: result.offset, totalCount: result.total }, plugins: result.data.map((plugin: any) => ({ pluginId: plugin.id, name: plugin.name, enabled: plugin.enabled, config: plugin.config, protocols: plugin.protocols, tags: plugin.tags, scoping: { consumerId: plugin.consumer?.id, serviceId: plugin.service?.id, routeId: plugin.route?.id, global: (!plugin.consumer && !plugin.service && !plugin.route) }, metadata: { createdAt: plugin.created_at, updatedAt: plugin.updated_at } })), relatedTools: [ "Use list-services and list-routes to find entities these plugins are applied to", "Use query-api-requests to analyze traffic affected by these plugins" ] }; } catch (error) { throw error; } }
- src/parameters.ts:102-112 (schema)Zod schema defining the input parameters for the list_plugins tool (controlPlaneId required, size default 100, optional offset).export const listPluginsParameters = () => z.object({ controlPlaneId: z.string() .describe("Control Plane ID (obtainable from list-control-planes tool)"), size: z.number().int() .min(1).max(1000) .default(100) .describe("Number of plugins to return"), offset: z.string() .optional() .describe("Offset token for pagination (from previous response)"), });
- src/tools.ts:56-62 (registration)Tool definition and registration entry in the tools() array used by the MCP server to register the list_plugins tool.{ method: "list_plugins", name: "List Plugins", description: prompts.listPluginsPrompt(), parameters: parameters.listPluginsParameters(), category: "configuration" },
- src/index.ts:101-107 (handler)Dispatch handler in MCP server's tool callback that routes list_plugins calls to the configuration.listPlugins implementation.case "list_plugins": result = await configuration.listPlugins( this.api, args.controlPlaneId, args.size, args.offset );
- src/prompts.ts:124-148 (helper)Prompt template providing detailed description of the list_plugins tool's input/output for use in tool registration.export const listPluginsPrompt = () => ` List all plugins associated with a control plane. INPUT: - controlPlaneId: String - ID of the control plane - size: Number - Number of plugins to return (1-1000, default: 100) - offset: String (optional) - Pagination offset token from previous response OUTPUT: - metadata: Object - Contains controlPlaneId, size, offset, nextOffset, totalCount - plugins: Array - List of plugins with details for each including: - pluginId: String - Unique identifier for the plugin - name: String - Name of the plugin (e.g., rate-limiting, cors, etc.) - enabled: Boolean - Whether the plugin is enabled - config: Object - Plugin-specific configuration - protocols: Array - Protocols this plugin applies to - tags: Array - Tags associated with the plugin - scoping: Object - Defines plugin scope including: - consumerId: String - Consumer this plugin applies to (if any) - serviceId: String - Service this plugin applies to (if any) - routeId: String - Route this plugin applies to (if any) - global: Boolean - Whether this is a global plugin - metadata: Object - Creation and update timestamps - relatedTools: Array - List of related tools for plugin configuration `;