Skip to main content
Glama
listWorkbooks.test.ts1.33 kB
import z from 'zod'; import { workbookSchema } from '../../../src/sdks/tableau/types/workbook.js'; import { getDefaultEnv, getSuperstoreWorkbook, resetEnv, setEnv } from '../../testEnv.js'; import { callTool } from '../client.js'; describe('list-workbooks', () => { beforeAll(setEnv); afterAll(resetEnv); it('should list workbooks', async () => { const env = getDefaultEnv(); const superstore = getSuperstoreWorkbook(env); const workbooks = await callTool('list-workbooks', { env, schema: z.array(workbookSchema), }); expect(workbooks.length).greaterThan(0); const workbook = workbooks.find((workbook) => workbook.name === 'Superstore'); expect(workbook).toMatchObject({ id: superstore.id, name: 'Superstore', defaultViewId: superstore.defaultViewId, }); }); it('should list workbooks with filter', async () => { const env = getDefaultEnv(); const superstore = getSuperstoreWorkbook(env); const workbooks = await callTool('list-workbooks', { env, schema: z.array(workbookSchema), toolArgs: { filter: 'name:eq:Super*' }, }); expect(workbooks).toHaveLength(1); expect(workbooks[0]).toMatchObject({ id: superstore.id, name: 'Superstore', defaultViewId: superstore.defaultViewId, }); }); });

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/datalabs89/tableau-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server