delete-tag
Remove a tag definition from Confluent Cloud's Schema Registry by specifying the tag name using this MCP server tool.
Instructions
Delete a tag definition from Confluent Cloud.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| baseUrl | No | The base URL of the Schema Registry REST API. | |
| tagName | Yes | Name of the tag to delete |
Implementation Reference
- The handle method implements the core logic to delete a tag definition from Confluent Cloud Schema Registry using the REST API DELETE request.async handle( clientManager: ClientManager, toolArguments: Record<string, unknown>, ): Promise<CallToolResult> { const { tagName, baseUrl } = deleteTagArguments.parse(toolArguments); if (baseUrl !== undefined && baseUrl !== "") { clientManager.setConfluentCloudSchemaRegistryEndpoint(baseUrl); } const pathBasedClient = wrapAsPathBasedClient( clientManager.getConfluentCloudSchemaRegistryRestClient(), ); const { response, error } = await pathBasedClient[ "/catalog/v1/types/tagdefs/{tagName}" ].DELETE({ params: { path: { tagName: tagName, }, }, }); if (error) { return this.createResponse( `Failed to delete tag: ${JSON.stringify(error)}`, true, ); } return this.createResponse( `Successfully deleted tag: ${tagName}. Status: ${response?.status}`, ); }
- Zod input schema for the delete-tag tool defining parameters: optional baseUrl (Schema Registry endpoint) and required tagName.const deleteTagArguments = z.object({ baseUrl: z .string() .describe("The base URL of the Schema Registry REST API.") .url() .default(() => env.SCHEMA_REGISTRY_ENDPOINT ?? "") .optional(), tagName: z.string().describe("Name of the tag to delete").nonempty(), });
- src/confluent/tools/tool-factory.ts:56-56 (registration)Registers the DeleteTagHandler in the ToolFactory's static handlers Map using the ToolName.DELETE_TAG key.[ToolName.DELETE_TAG, new DeleteTagHandler()],
- Defines the tool name constant 'delete-tag' in the ToolName enum, used for registration and identification.DELETE_TAG = "delete-tag",