/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { productsGet } from "../../funcs/productsGet.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { productId: z.string(), }; export const tool$productsGet: ToolDefinition = { name: "products-get", description: `Retrieve a product Retrieve product details by ID. View pricing, billing type, status, and product configuration.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await productsGet( client, args.productId, { 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); }, };