Tool: list_consumer_groups
List all consumer groups for Google Cloud Managed Service for Apache Kafka for a given project, location, and cluster. Please provide the Project ID, Location, and Cluster ID.
The following sample demonstrate how to use curl to invoke the list_consumer_groups MCP tool.
| Curl Request |
|---|
curl --location 'https://managedkafka.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "list_consumer_groups", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request for ListConsumerGroups.
ListConsumerGroupsRequest
| JSON representation |
|---|
{
"parent": string,
"pageSize": integer,
"pageToken": string,
"view": enum ( |
| Fields | |
|---|---|
parent |
Required. The parent cluster whose consumer groups are to be listed. Structured like |
pageSize |
Optional. The maximum number of consumer groups to return. The service may return fewer than this value. If unset or zero, all consumer groups for the parent is returned. |
pageToken |
Optional. A page token, received from a previous When paginating, all other parameters provided to |
view |
Optional. Specifies the view (BASIC or FULL) of the ConsumerGroup resource to be returned in the response. Defaults to FULL view. |
filter |
Optional. Filter expression for the result. Only supports filtering by topic name as a key in the |
Output Schema
Response for ListConsumerGroups.
ListConsumerGroupsResponse
| JSON representation |
|---|
{
"consumerGroups": [
{
object ( |
| Fields | |
|---|---|
consumerGroups[] |
The list of consumer group in the requested parent. The order of the consumer groups is unspecified. |
nextPageToken |
A token that can be sent as |
ConsumerGroup
| JSON representation |
|---|
{
"name": string,
"topics": {
string: {
object ( |
| Fields | |
|---|---|
name |
Identifier. The name of the consumer group. The |
topics |
Optional. Metadata for this consumer group for all topics it has metadata for. The key of the map is a topic name, structured like: projects/{project}/locations/{location}/clusters/{cluster}/topics/{topic} An object containing a list of |
TopicsEntry
| JSON representation |
|---|
{
"key": string,
"value": {
object ( |
| Fields | |
|---|---|
key |
|
value |
|
ConsumerTopicMetadata
| JSON representation |
|---|
{
"partitions": {
integer: {
object ( |
| Fields | |
|---|---|
partitions |
Optional. Metadata for this consumer group and topic for all partition indexes it has metadata for. An object containing a list of |
PartitionsEntry
| JSON representation |
|---|
{
"key": integer,
"value": {
object ( |
| Fields | |
|---|---|
key |
|
value |
|
ConsumerPartitionMetadata
| JSON representation |
|---|
{ "offset": string, "metadata": string } |
| Fields | |
|---|---|
offset |
Required. The current offset for this partition, or 0 if no offset has been committed. |
metadata |
Optional. The associated metadata for this partition, or empty if it does not exist. |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌