export type GetApiTakoV1TakoToolsDescriptionArgs = {index_ids?: string | undefined}; export type GetApiTakoV1TakoToolsDescriptionOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get descriptions of Tako search tool capabilities and available data topics. Returns what types of data Tako can search across (finance, economics, demographics, sports, politics, climate, health) with example metrics for each category. Useful for understanding what queries Tako can answer before searching. * * GET /tako/v1/tako_tools_description */ export const getApiTakoV1TakoToolsDescription = async (args: GetApiTakoV1TakoToolsDescriptionArgs, options?: GetApiTakoV1TakoToolsDescriptionOptions) => { const {baseUrl = "https://api.orthogonal.com/mpp", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.index_ids != null) query.append("index_ids", String(args.index_ids)) const url = `${baseUrl.replace(/\/+$/, '')}/tako/v1/tako_tools_description${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };