Skip to main content
Glama
getDatasourceMetadata.test.ts950 B
import { fieldsResultSchema } from '../../src/tools/getDatasourceMetadata/datasourceMetadataUtils.js'; import invariant from '../../src/utils/invariant.js'; import { getDefaultEnv, getSuperstoreDatasource, resetEnv, setEnv } from '../testEnv.js'; import { callTool } from './client.js'; describe('get-datasource-metadata', () => { beforeAll(setEnv); afterAll(resetEnv); it('should get metadata', async () => { const env = getDefaultEnv(); const superstore = getSuperstoreDatasource(env); const { fields } = await callTool('get-datasource-metadata', { env, schema: fieldsResultSchema, toolArgs: { datasourceLuid: superstore.id, }, }); invariant(fields, 'data is undefined'); expect(fields.length).toBeGreaterThan(0); const fieldNames = fields.map((field) => field.name); expect(fieldNames).toContain('Postal Code'); expect(fieldNames).toContain('Product Name'); }); });

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