Skip to content

Commit c1d85e4

Browse files
Use is empty
1 parent a10398a commit c1d85e4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/server/api/src/app/ai/mcp/tables-tools.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { createAxiosHeaders } from '@openops/common';
22
import { AppSystemProp, system } from '@openops/server-shared';
3+
import { isEmpty } from '@openops/shared';
34
import { experimental_createMCPClient as createMCPClient, ToolSet } from 'ai';
45
import { openopsTables } from '../../openops-tables';
56
import { authenticateAdminUserInOpenOpsTables } from '../../openops-tables/auth-admin-tables';
@@ -8,7 +9,7 @@ import { MCPTool } from './types';
89
export async function getTablesTools(): Promise<MCPTool> {
910
const { token } = await authenticateAdminUserInOpenOpsTables();
1011
const mcpEndpoint = await openopsTables.getMcpEndpointList(token);
11-
if (!mcpEndpoint?.length) {
12+
if (isEmpty(mcpEndpoint)) {
1213
return {
1314
client: undefined,
1415
toolSet: {},

0 commit comments

Comments
 (0)