delete_consumer_group
Remove a specific consumer group from a Kafka environment to manage cluster resources and maintain system organization.
Instructions
Delete a consumer group.
Args: environment: The environment name. group_id: The ID of the consumer group to delete.
Returns: The result of the delete operation.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| environment | Yes | ||
| group_id | Yes |
Implementation Reference
- The handler function implementing the 'delete_consumer_group' MCP tool. It deletes a Kafka consumer group by making a DELETE API request.@mcp.tool() async def delete_consumer_group(environment: str, group_id: str) -> Dict[str, Any]: """ Delete a consumer group. Args: environment: The environment name. group_id: The ID of the consumer group to delete. Returns: The result of the delete operation. """ endpoint = f"/api/v1/environments/{environment}/proxy/api/consumers/{group_id}" return await api_client._make_request("DELETE", endpoint)
- src/lenses_mcp/server.py:30-30 (registration)Calls the registration function to register the Kafka consumer groups tools, including 'delete_consumer_group', with the MCP server.register_kafka_consumer_groups(mcp)
- src/lenses_mcp/server.py:14-14 (registration)Imports the registration function for Kafka consumer groups tools.from tools.kafka_consumer_groups import register_kafka_consumer_groups