Tool: update_consumer_group
Update an existing Google Cloud Managed Service for Apache Kafka consumer group. This tool can only be used to update the offsets for topics consumed by the group.
Important Notes:
- To update a consumer group's offsets, the consumer group must be inactive (i.e., there are no active consumers in the group), and topics with new offsets must be provided.
- Before making an update, the agent should call
get_consumer_groupto retrieve the current consumer group configuration.
The following sample demonstrate how to use curl to invoke the update_consumer_group 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": "update_consumer_group", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request message for UpdateConsumerGroup.
UpdateConsumerGroupRequest
| JSON representation |
|---|
{
"name": string,
"topics": {
string: {
object ( |
| Fields | |
|---|---|
name |
Required. The name of the consumer group to update. Format: projects/{project}/locations/{location}/clusters/{cluster_id}/consumerGroups/{consumer_group_id} |
topics |
Optional. The topics and partitions for which to update offsets. 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. |
Output Schema
A Kafka consumer group in a given cluster.
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: ❌