Skip to main content
Glama

Simple MCP Server

pipeline.test.ts823 B
// @ts-ignore TS6133 import { expect, test } from "vitest"; import * as z from "zod/v3"; test("string to number pipeline", () => { const schema = z.string().transform(Number).pipe(z.number()); expect(schema.parse("1234")).toEqual(1234); }); test("string to number pipeline async", async () => { const schema = z .string() .transform(async (val) => Number(val)) .pipe(z.number()); expect(await schema.parseAsync("1234")).toEqual(1234); }); test("break if dirty", () => { const schema = z .string() .refine((c) => c === "1234") .transform(async (val) => Number(val)) .pipe(z.number().refine((v) => v < 100)); const r1: any = schema.safeParse("12345"); expect(r1.error.issues.length).toBe(1); const r2: any = schema.safeParse("3"); expect(r2.error.issues.length).toBe(1); });

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/shaleen-wonder-ent/simple-mcp-server'

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