/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { assetsListResourceTags } from "../../funcs/assetsListResourceTags.js";
import * as components from "../../models/components/index.js";
import { formatResult } from "../tools.js";
const args = {
    resourceType: components.ResourceTypeParameter$inboundSchema,
    prefix: z.string().optional(),
    nextCursor: z.string().optional(),
    maxResults: z.number().int().optional(),
};
export const tool$assetsListResourceTags = {
    name: "list-tags",
    description: `Retrieves a list of tags currently applied to assets in your Cloudinary account

Retrieves a comprehensive list of all tags that exist in your product environment for assets of the specified type.

[Cloudinary Admin API documentation](https://cloudinary.com/documentation/admin_api)
`,
    scopes: ["librarian"],
    args,
    tool: async (client, args, ctx) => {
        const [result, apiCall] = await assetsListResourceTags(client, args.resourceType, args.prefix, args.nextCursor, args.maxResults, { fetchOptions: { signal: ctx.signal } }).$inspect();
        if (!result.ok) {
            return {
                content: [{ type: "text", text: result.error.message }],
                isError: true,
            };
        }
        const value = result.value;
        return formatResult(value, apiCall);
    },
};
//# sourceMappingURL=assetsListResourceTags.js.map