MCP Tools Reference: managedkafka

Tool: list_consumer_groups

List all consumer groups for Google Cloud Managed Service for Apache Kafka for a given project, location, and cluster.

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 message for ListConsumerGroups.

ListConsumerGroupsRequest

JSON representation
{
  "parent": string,
  "pageSize": integer,
  "pageToken": string
}
Fields
parent

string

Required. The parent cluster whose consumer groups are to be listed. Format: projects/{project}/locations/{location}/clusters/{cluster_id}

pageSize

integer

Optional. The maximum number of consumer groups to return.

pageToken

string

Optional. A page token, received from a previous ListConsumerGroups call.

Output Schema

Response message for ListConsumerGroups.

ListConsumerGroupsResponse

JSON representation
{
  "consumerGroups": [
    {
      object (ConsumerGroup)
    }
  ],
  "nextPageToken": string
}
Fields
consumerGroups[]

object (ConsumerGroup)

The list of consumer groups in the requested parent.

nextPageToken

string

A token that can be sent as page_token to retrieve the next page of results. If this field is omitted, there are no more results.

ConsumerGroup

JSON representation
{
  "name": string,
  "topics": {
    string: {
      object (ConsumerTopicMetadata)
    },
    ...
  }
}
Fields
name

string

Identifier. The name of the consumer group. The consumer_group segment is used when connecting directly to the cluster. Structured like: projects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group}

topics

map (key: string, value: object (ConsumerTopicMetadata))

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 "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

TopicsEntry

JSON representation
{
  "key": string,
  "value": {
    object (ConsumerTopicMetadata)
  }
}
Fields
key

string

value

object (ConsumerTopicMetadata)

ConsumerTopicMetadata

JSON representation
{
  "partitions": {
    integer: {
      object (ConsumerPartitionMetadata)
    },
    ...
  }
}
Fields
partitions

map (key: integer, value: object (ConsumerPartitionMetadata))

Optional. Metadata for this consumer group and topic for all partition indexes it has metadata for.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

PartitionsEntry

JSON representation
{
  "key": integer,
  "value": {
    object (ConsumerPartitionMetadata)
  }
}
Fields
key

integer

value

object (ConsumerPartitionMetadata)

ConsumerPartitionMetadata

JSON representation
{
  "offset": string,
  "metadata": string
}
Fields
offset

string (int64 format)

Required. The current offset for this partition, or 0 if no offset has been committed.

metadata

string

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: ❌