/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { futuresGetCalendar } from "../../funcs/futuresGetCalendar.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.GetAssetCalendarRequest$inboundSchema, }; export const tool$futuresGetCalendar: ToolDefinition = { name: "futures-get-calendar", description: `Get trading calendar for a future Returns a list of all trading days for a given future symbol, based on the exchange where its contracts are traded. Prices, forecasts, and indicators are available for each of these days.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await futuresGetCalendar( 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); }, };