"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.tool$modelsList = void 0;
const modelsList_js_1 = require("../../funcs/modelsList.js");
const tools_js_1 = require("../tools.js");
exports.tool$modelsList = {
    name: "models-list",
    description: `List models

Lists the currently available models, and provides basic information about each one such as the owner and availability.`,
    tool: async (client, ctx) => {
        const [result, apiCall] = await (0, modelsList_js_1.modelsList)(client, { fetchOptions: { signal: ctx.signal } }).$inspect();
        if (!result.ok) {
            return {
                content: [{ type: "text", text: result.error.message }],
                isError: true,
            };
        }
        const value = result.value;
        return (0, tools_js_1.formatResult)(value, apiCall);
    },
};
//# sourceMappingURL=modelsList.js.map