Skip to main content
Glama

Memory Bank MCP Server

param-name-validator.ts650 B
import { InvalidParamError } from "../presentation/errors/index.js"; import { Validator } from "../presentation/protocols/validator.js"; import { NAME_REGEX } from "./constants.js"; export class ParamNameValidator implements Validator { constructor( private readonly fieldName: string, private readonly regex: RegExp = NAME_REGEX ) {} validate(input?: any): Error | null { if (!input || !input[this.fieldName]) { return null; } const paramName = input[this.fieldName]; const isValid = this.regex.test(paramName); if (!isValid) { return new InvalidParamError(paramName); } return null; } }

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/alioshr/memory-bank-mcp'

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