/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { assetsGetResourceByAssetId } from "../../funcs/assetsGetResourceByAssetId.js";
import { formatResult } from "../tools.js";
const args = {
    assetId: z.string(),
    colors: z.boolean().default(false),
    mediaMetadata: z.boolean().default(false),
    faces: z.boolean().default(false),
    qualityAnalysis: z.boolean().default(false),
    accessibilityAnalysis: z.boolean().default(false),
    pages: z.boolean().default(false),
    phash: z.boolean().default(false),
    coordinates: z.boolean().default(false),
    versions: z.boolean().default(false),
    maxResults: z.number().int().default(10),
    derivedNextCursor: z.string().optional(),
};
export const tool$assetsGetResourceByAssetId = {
    name: "get-asset-details",
    description: `Get resource by asset ID

Returns the details of a single resource specified by its asset ID.`,
    scopes: ["librarian"],
    args,
    tool: async (client, args, ctx) => {
        const [result, apiCall] = await assetsGetResourceByAssetId(client, args.assetId, args.colors, args.mediaMetadata, args.faces, args.qualityAnalysis, args.accessibilityAnalysis, args.pages, args.phash, args.coordinates, args.versions, args.maxResults, args.derivedNextCursor, { 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=assetsGetResourceByAssetId.js.map