Skip to main content
Glama

agentek-eth

by NaniDAO
utils.ts795 B
import { Address } from "viem"; import { z } from "zod"; import { isAddress } from "viem/utils"; export const addressSchema = z.string().transform((val, ctx) => { if (!isAddress(val)) { ctx.addIssue({ code: z.ZodIssueCode.custom, message: "Invalid Ethereum address", }); // stop here return z.NEVER; } return val as Address; // output is Address }); export const clean = (obj: any): any => { if (typeof obj === "bigint") { return obj.toString(); } if (Array.isArray(obj)) { return obj.map(clean); } if (typeof obj === "string") { return obj.trim(); } if (obj && typeof obj === "object") { const newObj: any = {}; for (const key in obj) { newObj[key] = clean(obj[key]); } return newObj; } return obj; };

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/NaniDAO/agentek'

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