/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 0f7022b64923
 */
import { searchVisualSearchAssets } from "../../funcs/searchVisualSearchAssets.js";
import { VisualSearchParametersUnion$zodSchema } from "../../models/visualsearchparametersunion.js";
import { formatResult } from "../tools.js";
const args = {
    request: VisualSearchParametersUnion$zodSchema.describe(`The visual search parameters.`),
};
export const tool$searchVisualSearchAssets = {
    name: "visual-search-assets",
    description: `Finds images in your asset library based on visual similarity or content

Returns a list of resources that are visually similar to a specified image. You can provide the source image for comparison in one of three ways:
- Provide a URL of an image
- Specify the asset ID of an existing image
- Provide a textual description
`,
    scopes: ["librarian"],
    annotations: {
        "title": "Visual Search Assets",
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true,
    },
    args,
    tool: async (client, args, ctx) => {
        const [result] = await searchVisualSearchAssets(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
        if (!result.ok) {
            return {
                content: [{ type: "text", text: result.error.message }],
                isError: true,
            };
        }
        return formatResult(result.value);
    },
};
//# sourceMappingURL=searchVisualSearchAssets.js.map