Skip to main content
Glama

BoldSign MCP Server

utils.ts1.84 kB
import z from 'zod'; import { NullOrUndefined } from '../utils/types.js'; export function stringEquals(value1: string | NullOrUndefined, value2: string | NullOrUndefined): boolean { return isNotNullOrUndefined(value1) && isNotNullOrUndefined(value2) ? value1!!.toUpperCase() === value2!!.toUpperCase() : false; } export function toJsonString(value: any) { return JSON.stringify(value, null, 1); } export function isNullOrUndefined(value: any | NullOrUndefined) { return value === null || value === undefined; } export function isNotNullOrUndefined(value: any | NullOrUndefined) { return value !== null && value !== undefined; } export function isNotEmpty(value: string | NullOrUndefined) { return isNotNullOrUndefined(value) && (value?.trim().length ?? 0 > 0); } export function isNotNullOrUndefinedOrEmpty(values: any[] | NullOrUndefined) { return values !== null && values !== undefined && values.length > 0; } export function zodToJsonSchema<T extends z.ZodTypeAny>(zodSchema: T) { return z.toJSONSchema(zodSchema, { unrepresentable: 'any', target: 'draft-7', override: (ctx) => { const def = ctx.zodSchema._zod.def; if (!def || !def?.type) return; switch (def.type) { case 'date': ctx.jsonSchema.type = 'string'; ctx.jsonSchema.format = 'date-time'; break; case 'bigint': // BigInt can be represented as string to preserve precision ctx.jsonSchema.type = 'string'; ctx.jsonSchema.pattern = '^-?\\d+$'; ctx.jsonSchema.description = 'BigInt represented as string'; break; case 'symbol': ctx.jsonSchema.type = 'string'; ctx.jsonSchema.description = 'Symbol represented as string'; break; default: break; } }, }); }

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/Synctest-hub/boldsign-mcp'

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