Skip to main content
Glama
confluentinc

mcp-confluent

Official
by confluentinc

delete-connector

Remove a specified connector from a Kafka environment using the MCP server. Ensures clean deletion and returns a success message upon completion.

Instructions

Delete an existing connector. Returns success message if deletion was successful.

Input Schema

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

Implementation Reference

  • DeleteConnectorHandler class that implements the core logic for the 'delete-connector' tool, including the handle method that performs the deletion via REST API.
    export class DeleteConnectorHandler extends BaseToolHandler {
      async handle(
        clientManager: ClientManager,
        toolArguments: Record<string, unknown> | undefined,
      ): Promise<CallToolResult> {
        const { clusterId, environmentId, connectorName, baseUrl } =
          deleteConnectorArguments.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 { error } = await pathBasedClient[
          "/connect/v1/environments/{environment_id}/clusters/{kafka_cluster_id}/connectors/{connector_name}"
        ].DELETE({
          params: {
            path: {
              environment_id: environment_id,
              kafka_cluster_id: kafka_cluster_id,
              connector_name: connectorName,
            },
          },
        });
    
        if (error) {
          return this.createResponse(
            `Failed to delete connector ${connectorName}: ${JSON.stringify(error)}`,
            true,
          );
        }
        return this.createResponse(
          `Successfully deleted connector ${connectorName}`,
        );
      }
    
      getToolConfig(): ToolConfig {
        return {
          name: ToolName.DELETE_CONNECTOR,
          description:
            "Delete an existing connector. Returns success message if deletion was successful.",
          inputSchema: deleteConnectorArguments.shape,
        };
      }
    
      getRequiredEnvVars(): EnvVar[] {
        return ["CONFLUENT_CLOUD_API_KEY", "CONFLUENT_CLOUD_API_SECRET"];
      }
    
      isConfluentCloudOnly(): boolean {
        return true;
      }
    }
  • Zod input schema definition for the 'delete-connector' tool arguments.
    const deleteConnectorArguments = 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()
        .optional()
        .describe(
          "The unique identifier for the environment this resource belongs to.",
        ),
      clusterId: z
        .string()
        .optional()
        .describe("The unique identifier for the Kafka cluster."),
      connectorName: z
        .string()
        .nonempty()
        .describe("The name of the connector to delete."),
    });
  • Registration of the DeleteConnectorHandler in the ToolFactory's handlers map for the 'delete-connector' tool.
    [ToolName.DELETE_CONNECTOR, new DeleteConnectorHandler()],
  • ToolName enum constant defining the 'delete-connector' tool name.
    DELETE_CONNECTOR = "delete-connector",
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions that deletion returns a success message, which is helpful, but lacks critical behavioral details: it doesn't specify if deletion is permanent/reversible, what permissions are required, whether it affects related resources, or any rate limits/error conditions. For a destructive operation with zero annotation coverage, this is insufficient.

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 two concise sentences with zero waste: the first states the purpose, and the second adds behavioral context about the return value. It's front-loaded and efficiently structured.

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 this is a destructive operation with no annotations and no output schema, the description is incomplete. It should explain more about the deletion's impact (e.g., permanence, side effects) and error handling, especially since siblings include similar tools like 'delete-topics' that might have different behaviors.

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 fully documents all 4 parameters. The description adds no additional meaning about parameters beyond implying 'connectorName' is required (which is already in the schema). Baseline 3 is appropriate when the schema does all the work.

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 ('Delete') and resource ('an existing connector'), which is specific and unambiguous. It distinguishes from siblings like 'create-connector' and 'read-connector' by focusing on deletion, though it doesn't explicitly mention these alternatives in the description itself.

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. It doesn't mention prerequisites (e.g., the connector must exist), when not to use it, or how it differs from other deletion tools like 'delete-topics' or 'delete-flink-statements' in the sibling list.

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