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

Retrieves detailed information about the specified metadata field.`,
    scopes: ["admin"],
    annotations: {
        "title": "Get Metadata Field",
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true,
    },
    args,
    tool: async (client, args, ctx) => {
        const [result] = await metadataFieldsGetMetadataField(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=metadataFieldsGetMetadataField.js.map