Skip to main content
Glama
queryDatasource.test.ts829 B
import z from 'zod'; import { QueryOutput } from '../../src/sdks/tableau/apis/vizqlDataServiceApi.js'; import { getDefaultEnv, getSuperstoreDatasource, resetEnv, setEnv } from '../testEnv.js'; import { callTool } from './client.js'; describe('query-datasource', () => { beforeAll(setEnv); afterAll(resetEnv); it('should query datasource', async () => { const env = getDefaultEnv(); const superstore = getSuperstoreDatasource(env); const { data } = await callTool('query-datasource', { env, schema: QueryOutput, toolArgs: { datasourceLuid: superstore.id, query: { fields: [{ fieldCaption: 'Postal Code' }] }, }, }); const postalCodes = z.array(z.object({ 'Postal Code': z.string() })).parse(data); expect(postalCodes.length).toBeGreaterThan(0); }); });

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