/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { dataGetMetadata } from "../../funcs/dataGetMetadata.js"; import { formatResult, ToolDefinition } from "../tools.js"; export const tool$dataGetMetadata: ToolDefinition = { name: "data-get-metadata", description: `Get metadata and most recent prices Returns a list of all asset classes, assets, and currently active contracts tracked by Hedgewise, as well as their prices from the prior trading day. Used to build the table on the Hedgewise landing page.`, tool: async (client, ctx) => { const [result, apiCall] = await dataGetMetadata( client, { 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); }, };