Skip to main content
Glama
queryDatasourceValidator.test.ts799 B
import { validateQuery } from './queryDatasourceValidator.js'; describe('validateQuery', () => { it('should throw if the query does not match the expected schema', () => { const query = { fields: [ { fieldCaption: 'Sales', }, ], filters: [ { field: { fieldCaption: 'Date' }, filterType: 'QUANTITATIVE_DATE', minDate: '2025-03-14', maxDate: '2025-03-14', context: false, includeNulls: false, quantitativeFilterType: 'MIN', }, ], } as const; // @ts-expect-error - This is a test for the type validator expect(() => validateQuery({ datasourceLuid: '123', query })).toThrow( 'The query does not match the expected schema.', ); }); });

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