Skip to main content
Glama
confluentinc

mcp-confluent

Official
by confluentinc

read-connector

Retrieve detailed information about a specific Kafka connector by providing its unique name, base URL, environment ID, and cluster ID using the MCP server.

Instructions

Get information about the connector.

Input Schema

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

Implementation Reference

  • The handle method executes the tool logic: parses input arguments, ensures environment and cluster IDs, sets REST endpoint if provided, calls the Kafka Connect REST API to GET connector details, and returns success or error response.
    async handle(
      clientManager: ClientManager,
      toolArguments: Record<string, unknown> | undefined,
    ): Promise<CallToolResult> {
      const { clusterId, environmentId, connectorName, baseUrl } =
        readConnectorArguments.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/{connector_name}"
      ].GET({
        params: {
          path: {
            connector_name: connectorName,
            environment_id: environment_id,
            kafka_cluster_id: kafka_cluster_id,
          },
        },
      });
      if (error) {
        return this.createResponse(
          `Failed to get information about connector ${connectorName}: ${JSON.stringify(error)}`,
          true,
        );
      }
      return this.createResponse(
        `Connector Details for ${connectorName}: ${JSON.stringify(response)}`,
      );
    }
  • Zod input schema defining parameters for the read-connector tool: baseUrl (optional), environmentId (optional), clusterId (optional), connectorName (required).
    const readConnectorArguments = 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."),
      connectorName: z
        .string()
        .trim()
        .nonempty()
        .describe("The unique name of the connector."),
    });
  • Registration of the ReadConnectorHandler instance in the ToolFactory's static handlers Map under the key ToolName.READ_CONNECTOR.
    [ToolName.READ_CONNECTOR, new ReadConnectorHandler()],
  • Enum value defining the tool name string 'read-connector' used in registration and tool config.
    READ_CONNECTOR = "read-connector",
  • getToolConfig method providing the tool's name, description, and inputSchema for MCP tool registration.
    getToolConfig(): ToolConfig {
      return {
        name: ToolName.READ_CONNECTOR,
        description: "Get information about the connector.",
        inputSchema: readConnectorArguments.shape,
      };
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but only states the basic action. It doesn't cover critical aspects like whether this is a read-only operation, if it requires specific permissions, potential rate limits, or what the output format might be, making it insufficient for a tool with multiple parameters.

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, straightforward sentence with no wasted words. It's appropriately sized for a simple tool, though its brevity contributes to gaps in other dimensions, but purely in terms of conciseness, it's efficient.

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?

Given the tool has 4 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain the return values, error conditions, or how parameters interact, leaving significant gaps for the agent to understand the tool's full context and behavior.

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?

The schema description coverage is 100%, meaning all parameters are documented in the schema itself. The description adds no additional meaning beyond what the schema provides, such as explaining relationships between parameters or usage examples, so it meets the baseline score of 3.

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

Purpose2/5

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

The description 'Get information about the connector' restates the tool name 'read-connector' in slightly different words, making it tautological. It doesn't specify what type of information is retrieved or how this differs from sibling tools like 'list-connectors' or 'create-connector', leaving the purpose vague beyond the obvious.

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

Usage Guidelines1/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. It doesn't mention prerequisites like needing a connector name, nor does it differentiate from sibling tools such as 'list-connectors' for broader queries or 'create-connector' for setup, leaving the agent with no usage context.

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