MCP Tools Reference: managedkafka

Tool: get_topic

Get the details of an existing Google Cloud Managed Service for Apache Kafka topic.

The following sample demonstrate how to use curl to invoke the get_topic 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": "get_topic", 
 "arguments": { 
 // provide these details according to the tool' 
s  
MCP  
specification  
 } 
  
 } 
,  
 "jsonrpc" 
:  
 "2.0" 
,  
 "id" 
:  
 1 
 } 
 ' 
  

Input Schema

Request message for GetTopic.

GetTopicRequest

JSON representation
 { 
 "name" 
 : 
 string 
 } 
Fields
name

string

Required. The name of the topic to retrieve. Format: projects/{project}/locations/{location}/clusters/{cluster_id}/topics/{topic_id}

Output Schema

A Kafka topic in a given cluster.

Topic

JSON representation
 { 
 "name" 
 : 
 string 
 , 
 "partitionCount" 
 : 
 integer 
 , 
 "replicationFactor" 
 : 
 integer 
 , 
 "configs" 
 : 
 { 
 string 
 : 
 string 
 , 
 ... 
 } 
 } 
Fields
name

string

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

partitionCount

integer

Required. The number of partitions this topic has. The partition count can only be increased, not decreased. Please note that if partitions are increased for a topic that has a key, the partitioning logic or the ordering of the messages will be affected.

replicationFactor

integer

Required. Immutable. The number of replicas of each partition. A replication factor of 3 is recommended for high availability.

configs

map (key: string, value: string)

Optional. Configurations for the topic that are overridden from the cluster defaults. The key of the map is a Kafka topic property name, for example: cleanup.policy , compression.type .

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

ConfigsEntry

JSON representation
 { 
 "key" 
 : 
 string 
 , 
 "value" 
 : 
 string 
 } 
Fields
key

string

value

string

Tool Annotations

Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌

Create a Mobile Website
View Site in Mobile | Classic
Share by: