/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { metadataRulesDeleteMetadataRule } from "../../funcs/metadataRulesDeleteMetadataRule.js";
import { formatResult } from "../tools.js";
const args = {
    external_id: z.string().describe("The unique identifier of the metadata rule."),
};
export const tool$metadataRulesDeleteMetadataRule = {
    name: "delete-metadata-rule",
    description: `Deletes a conditional metadata rule by its ID

Permanently deletes a metadata rule.`,
    scopes: ["builder"],
    annotations: {
        "title": "Delete Metadata Rule",
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": false,
    },
    args,
    tool: async (client, args, ctx) => {
        const [result] = await metadataRulesDeleteMetadataRule(client, args.external_id, { fetchOptions: { signal: ctx.signal } }).$inspect();
        if (!result.ok) {
            return {
                content: [{ type: "text", text: result.error.message }],
                isError: true,
            };
        }
        return formatResult(result.value);
    },
};
//# sourceMappingURL=metadataRulesDeleteMetadataRule.js.map