Skip to main content
Glama

Simple MCP Server

standard-schema.test.ts1.37 kB
import { expect, test } from "vitest"; import * as z from "zod/v4"; test("length checks", async () => { const schema = z.string(); const result = await schema["~standard"].validate(12); expect(result).toMatchInlineSnapshot(` { "issues": [ { "code": "invalid_type", "expected": "string", "message": "Invalid input: expected string, received number", "path": [], }, ], } `); }); test("length checks", async () => { const schema = z.string(); const result = await schema["~standard"].validate("asdf"); expect(result).toMatchInlineSnapshot(` { "value": "asdf", } `); }); test("length checks", async () => { const schema = z.string().refine(async (val) => val.length > 5); const result = await schema["~standard"].validate(12); expect(result).toMatchInlineSnapshot(` { "issues": [ { "code": "invalid_type", "expected": "string", "message": "Invalid input: expected string, received number", "path": [], }, ], } `); }); test("length checks", async () => { const schema = z.string().refine(async (val) => val.length > 5); const result = await schema["~standard"].validate("234134134"); expect(result).toMatchInlineSnapshot(` { "value": "234134134", } `); });

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