/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 317d658a1160
 */
import * as z from "zod";
import { assetsListResourceTags } from "../../funcs/assetsListResourceTags.js";
import { ResourceType$zodSchema } from "../../models/resourcetype.js";
import { formatResult } from "../tools.js";
const args = {
    resource_type: ResourceType$zodSchema.describe(`The type of resource (image, video, or raw).`),
    prefix: z.string().describe("Limit the returned tags to those that start with the specified prefix.").optional(),
    next_cursor: z.string().describe("Cursor for pagination.").optional(),
    max_results: z.int().describe("Maximum number of results to return (1-500).")
        .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"],
    annotations: {
        "title": "List Tags",
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true,
    },
    args,
    tool: async (client, args, ctx) => {
        const [result] = await assetsListResourceTags(client, args.resource_type, args.prefix, args.next_cursor, args.max_results, { fetchOptions: { signal: ctx.signal } }).$inspect();
        if (!result.ok) {
            return {
                content: [{ type: "text", text: result.error.message }],
                isError: true,
            };
        }
        return formatResult(result.value);
    },
};
//# sourceMappingURL=assetsListResourceTags.js.map