/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { metadataFieldsDeleteMetadataFieldDatasource } from "../../funcs/metadataFieldsDeleteMetadataFieldDatasource.js";
import { DatasourceExternalIdsRequest$zodSchema } from "../../models/datasourceexternalidsrequest.js";
import { formatResult } from "../tools.js";
const args = {
    external_id: z.string().describe("The external ID of the metadata field to update the datasource for."),
    datasource_external_ids_request: DatasourceExternalIdsRequest$zodSchema
        .describe(`The datasource entry external IDs to delete.`),
};
export const tool$metadataFieldsDeleteMetadataFieldDatasource = {
    name: "delete-metadata-datasource-values",
    description: `Removes one or more allowed values from a metadata field's datasource

Removes specific values from a metadata field's datasource by their external IDs.`,
    scopes: ["builder"],
    annotations: {
        "title": "Delete Metadata Datasource Values",
        "destructiveHint": true,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": false,
    },
    args,
    tool: async (client, args, ctx) => {
        const [result] = await metadataFieldsDeleteMetadataFieldDatasource(client, args.external_id, args.datasource_external_ids_request, { fetchOptions: { signal: ctx.signal } }).$inspect();
        if (!result.ok) {
            return {
                content: [{ type: "text", text: result.error.message }],
                isError: true,
            };
        }
        return formatResult(result.value);
    },
};
//# sourceMappingURL=metadataFieldsDeleteMetadataFieldDatasource.js.map