/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { featuresGetTree } from "../../funcs/featuresGetTree.js"; import { formatResult, ToolDefinition } from "../tools.js"; export const tool$featuresGetTree: ToolDefinition = { name: "features-get-tree", description: `Provide the tree structure of the features faceting panel Provide the organization of a search tree over the features organization`, tool: async (client, ctx) => { const [result, apiCall] = await featuresGetTree( 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); }, };