Skip to main content
Glama
confluentinc

mcp-confluent

Official
by confluentinc

list-topics

Retrieve a complete list of topics in your Kafka cluster using the mcp-confluent server. Simplify cluster management by accessing all available topics in one request.

Instructions

List all topics in the Kafka cluster.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • ListTopicsHandler class that extends BaseToolHandler. The handle() method lists all Kafka topics using the admin client and returns a formatted string response. Also defines tool config including schema and required env vars.
    export class ListTopicsHandler extends BaseToolHandler {
      async handle(
        clientManager: ClientManager,
        // eslint-disable-next-line @typescript-eslint/no-unused-vars
        toolArguments: Record<string, unknown>,
      ): Promise<CallToolResult> {
        const topics = await (await clientManager.getAdminClient()).listTopics();
        return this.createResponse(`Kafka topics: ${topics.join(",")}`);
      }
    
      getToolConfig(): ToolConfig {
        return {
          name: ToolName.LIST_TOPICS,
          description: "List all topics in the Kafka cluster.",
          inputSchema: listTopicArgs.shape,
        };
      }
    
      getRequiredEnvVars(): EnvVar[] {
        return ["KAFKA_API_KEY", "KAFKA_API_SECRET", "BOOTSTRAP_SERVERS"];
      }
    }
  • Zod schema for tool input arguments, which requires no parameters.
    const listTopicArgs = z.object({
      // No arguments
    });
  • Registration of the ListTopicsHandler instance in the ToolFactory's static handlers Map, keyed by ToolName.LIST_TOPICS.
    [ToolName.LIST_TOPICS, new ListTopicsHandler()],
  • Enum definition for the tool name 'list-topics' used in registration and tool config.
    LIST_TOPICS = "list-topics",
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While 'List all topics' implies a read-only operation, it doesn't disclose important behavioral traits like whether this returns all topics at once (vs paginated), what format the output takes, or any rate limits or permissions required.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states exactly what the tool does with zero wasted words. It's appropriately sized for a simple list operation with no parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the output looks like (list format, topic details included), whether it's paginated, or any constraints on usage. Given the lack of structured information, the description should provide more context about the operation's behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the parameter situation. The description appropriately doesn't mention parameters since none exist, earning a baseline 4 for not adding unnecessary information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List all topics') and the resource ('in the Kafka cluster'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'search-topics-by-name' or 'search-topics-by-tag' which also list topics with filtering.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'search-topics-by-name' or 'search-topics-by-tag'. It doesn't mention that this returns ALL topics without filtering, which would be important context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/confluentinc/mcp-confluent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server