Skip to main content
Glama

Simple MCP Server

coalesce.test.ts743 B
import { expect, test } from "vitest"; test("coalesce", () => { expect(true).toBe(true); }); // test("nonoptional with default", () => { // const schema = z.string().optional().coalesce("hi"); // expectTypeOf<typeof schema._input>().toEqualTypeOf<string | undefined>(); // expectTypeOf<typeof schema._output>().toEqualTypeOf<string>(); // expect(schema.parse(undefined)).toBe("hi"); // }); // test("nonoptional in object", () => { // const schema = z.object({ hi: z.string().optional().nonoptional("hi") }); // expectTypeOf<typeof schema._input>().toEqualTypeOf<{ hi: string | undefined }>(); // expectTypeOf<typeof schema._output>().toEqualTypeOf<{ hi: string }>(); // expect(schema.parse(undefined)).toBe("hi"); // });

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