Tool: list_topics
List all topics 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_topics 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_topics", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request for ListTopics.
ListTopicsRequest
| JSON representation |
|---|
{ "parent": string, "pageSize": integer, "pageToken": string } |
| Fields | |
|---|---|
parent |
Required. The parent cluster whose topics are to be listed. Structured like |
pageSize |
Optional. The maximum number of topics to return. The service may return fewer than this value. If unset or zero, all topics for the parent is returned. |
pageToken |
Optional. A page token, received from a previous When paginating, all other parameters provided to |
Output Schema
Response for ListTopics.
ListTopicsResponse
| JSON representation |
|---|
{
"topics": [
{
object ( |
| Fields | |
|---|---|
topics[] |
The list of topics in the requested parent. The order of the topics is unspecified. |
nextPageToken |
A token that can be sent as |
Topic
| JSON representation |
|---|
{ "name": string, "partitionCount": integer, "replicationFactor": integer, "configs": { string: string, ... } } |
| Fields | |
|---|---|
name |
Identifier. The name of the topic. The |
partitionCount |
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 |
Required. Immutable. The number of replicas of each partition. A replication factor of 3 is recommended for high availability. |
configs |
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: An object containing a list of |
ConfigsEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌