Skip to main content
Glama
confluentinc

mcp-confluent

Official
by confluentinc

list-connectors

Retrieve active Kafka connector names via the Kafka Connect REST API to simplify specific connector read requests on the mcp-confluent server.

Instructions

Retrieve a list of "names" of the active connectors. You can then make a read request for a specific connector by name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseUrlNoThe base URL of the Kafka Connect REST API.
clusterIdNoThe unique identifier for the Kafka cluster.
environmentIdNoThe unique identifier for the environment this resource belongs to.

Implementation Reference

  • The handle method of ListConnectorsHandler class, which executes the logic to list active connectors using the Confluent Cloud REST API.
    async handle(
      clientManager: ClientManager,
      toolArguments: Record<string, unknown> | undefined,
    ): Promise<CallToolResult> {
      const { clusterId, environmentId, baseUrl } =
        listConnectorArguments.parse(toolArguments);
    
      const environment_id = getEnsuredParam(
        "KAFKA_ENV_ID",
        "Environment ID is required",
        environmentId,
      );
      const kafka_cluster_id = getEnsuredParam(
        "KAFKA_CLUSTER_ID",
        "Kafka Cluster ID is required",
        clusterId,
      );
    
      if (baseUrl !== undefined && baseUrl !== "") {
        clientManager.setConfluentCloudRestEndpoint(baseUrl);
      }
    
      const pathBasedClient = wrapAsPathBasedClient(
        clientManager.getConfluentCloudRestClient(),
      );
      const { data: response, error } = await pathBasedClient[
        "/connect/v1/environments/{environment_id}/clusters/{kafka_cluster_id}/connectors"
      ].GET({
        params: {
          path: {
            environment_id: environment_id,
            kafka_cluster_id: kafka_cluster_id,
          },
        },
      });
      if (error) {
        return this.createResponse(
          `Failed to list Confluent Cloud connectors for ${clusterId}: ${JSON.stringify(error)}`,
          true,
        );
      }
      return this.createResponse(
        `Active Connectors: ${JSON.stringify(response?.join(","))}`,
      );
    }
  • Zod schema defining the input arguments for the list-connectors tool: baseUrl, environmentId, clusterId.
    const listConnectorArguments = z.object({
      baseUrl: z
        .string()
        .trim()
        .describe("The base URL of the Kafka Connect REST API.")
        .url()
        .default(() => env.CONFLUENT_CLOUD_REST_ENDPOINT ?? "")
        .optional(),
      environmentId: z
        .string()
        .trim()
        .optional()
        .describe(
          "The unique identifier for the environment this resource belongs to.",
        ),
      clusterId: z
        .string()
        .trim()
        .optional()
        .describe("The unique identifier for the Kafka cluster."),
    });
  • Registration of the ListConnectorsHandler in the ToolFactory's static handlers Map using the tool name.
    [ToolName.LIST_CONNECTORS, new ListConnectorsHandler()],
  • Enum definition for the tool name 'list-connectors' used in registration and configuration.
    LIST_CONNECTORS = "list-connectors",
  • getToolConfig method providing the tool name, description, and input schema for MCP tool registration.
    getToolConfig(): ToolConfig {
      return {
        name: ToolName.LIST_CONNECTORS,
        description:
          'Retrieve a list of "names" of the active connectors. You can then make a read request for a specific connector by name.',
        inputSchema: listConnectorArguments.shape,
      };
    }
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. It states this retrieves a list of 'active' connectors, which implies a filter, but doesn't explain what 'active' means, whether there are pagination limits, authentication requirements, rate limits, or error conditions. The description is minimal and lacks important operational context.

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 extremely concise with just two sentences that both earn their place. The first sentence states the core purpose, and the second provides valuable usage guidance about the sibling tool. There is zero wasted text or redundancy.

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

Completeness3/5

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

For a tool with 3 parameters, 100% schema coverage, no output schema, and no annotations, the description is adequate but minimal. It covers the basic purpose and points to the next logical tool, but lacks details about the return format, what 'active' means, or any behavioral constraints that would be important for an agent to use this tool effectively.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all three parameters (baseUrl, clusterId, environmentId) with their descriptions. The tool description adds no additional parameter information beyond what's in the schema, meeting the baseline expectation when schema coverage is complete.

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 verb 'retrieve' and the resource 'list of names of active connectors', making the purpose understandable. It distinguishes from the sibling 'read-connector' by mentioning that tool for specific connector details, but doesn't explicitly differentiate from other list tools like 'list-clusters' or 'list-topics' beyond the connector focus.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool ('retrieve a list of names') and explicitly mentions the alternative 'read-connector' for getting details about a specific connector. However, it doesn't specify when NOT to use this tool or compare it to other list tools like 'list-clusters' or 'list-topics'.

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