/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { performanceMetricsGet } from "../../funcs/performanceMetricsGet.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.GetPerformanceMetricsRequest$inboundSchema, }; export const tool$performanceMetricsGet: ToolDefinition = { name: "performance-metrics-get", description: `Get performance related data metrics for a given futures price forecast model at a given horizon. The metrics values are not provided as-is, but the relevant data and recommended aggregation method for each metric is returned.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await performanceMetricsGet( client, args.request, { 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); }, };