/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { tenantsList } from "../../funcs/tenantsList.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.ListTenantsRequest$inboundSchema, }; export const tool$tenantsList: ToolDefinition = { name: "tenants-list", description: `List Tenants List all tenants with cursor-based pagination. **Requirements:** This endpoint requires Redis with RediSearch module (e.g., \`redis/redis-stack-server\`). If RediSearch is not available, this endpoint returns \`501 Not Implemented\`. When authenticated with a Tenant JWT, returns only the authenticated tenant. Pagination is not used in this case. `, args, tool: async (client, args, ctx) => { const [result, apiCall] = await tenantsList( 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.result; return formatResult(value, apiCall); }, };