/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { metadataFieldsDeleteMetadataField } from "../../funcs/metadataFieldsDeleteMetadataField.js";
import { formatResult } from "../tools.js";
const args = {
    external_id: z.string().describe("The external ID of the metadata field."),
};
export const tool$metadataFieldsDeleteMetadataField = {
    name: "delete-metadata-field",
    description: `Deletes a structured metadata field definition from your account

Permanently deletes the specified metadata field and all its associated data.`,
    scopes: ["builder"],
    annotations: {
        "title": "Delete Metadata Field",
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": false,
    },
    args,
    tool: async (client, args, ctx) => {
        const [result] = await metadataFieldsDeleteMetadataField(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=metadataFieldsDeleteMetadataField.js.map