Skip to main content
Glama
getViewData.test.ts1.2 kB
import z from 'zod'; import { getDefaultEnv, getSuperstoreWorkbook, resetEnv, setEnv } from '../../testEnv.js'; import { callTool } from '../client.js'; describe('get-view-data', () => { beforeAll(setEnv); afterAll(resetEnv); it('should get view data', async () => { const env = getDefaultEnv(); const superstore = getSuperstoreWorkbook(env); const data = await callTool('get-view-data', { env, schema: z.string(), toolArgs: { viewId: superstore.defaultViewId }, }); const lines = data.split('\n'); expect(lines.length).toBeGreaterThan(0); expect(lines[0]).toBe( 'Country/Region,State/Province,Profit Ratio,Latitude (generated),Longitude (generated)', ); const firstRowColumns = lines[1].split(','); expect(firstRowColumns.length).toBeGreaterThan(0); expect(firstRowColumns[0], 'Country/Region').toMatch(/^\S+$/); expect(firstRowColumns[1], 'State/Province').toMatch(/^\S+$/); expect(firstRowColumns[2], 'Profit Ratio').toMatch(/^[-0-9.]+%$/); expect(firstRowColumns[3], 'Latitude (generated)').toMatch(/^[-0-9.]+$/); expect(firstRowColumns[4], 'Longitude (generated)').toMatch(/^[-0-9.]+$/); }); });

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