Skip to main content
Glama

ACP Commerce MCP Server

validation.ts533 B
import { NextFunction, Request, Response } from 'express'; import { ZodSchema } from 'zod'; import { formatACPError, acpStatusFromError } from '../utils/error-handler.js'; export function validateBody(schema: ZodSchema) { return (req: Request, res: Response, next: NextFunction) => { try { req.body = schema.parse(req.body); next(); } catch (error) { const acpError = formatACPError(error, req.headers['request-id'] as string); res.status(acpStatusFromError(acpError)).json(acpError); } }; }

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/gratitude5dee/wzrdmcp'

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