Skip to main content
Glama

AWS MCP Infrastructure

validators.ts•828 B
import Joi from 'joi'; import { ResourceQuery } from '../types'; export const resourceQuerySchema = Joi.object<ResourceQuery>({ resourceType: Joi.string() .valid('ec2', 's3', 'dynamodb', 'lambda', 'iam-role') .required(), action: Joi.string() .valid('create', 'delete') .required(), parameters: Joi.object() .when('action', { is: 'create', then: Joi.required(), otherwise: Joi.optional(), }), resourceId: Joi.string() .when('action', { is: 'delete', then: Joi.required(), otherwise: Joi.optional(), }), }); export const validateResourceQuery = (query: any): ResourceQuery => { const { error, value } = resourceQuerySchema.validate(query); if (error) { throw new Error(`Validation error: ${error.details[0].message}`); } return value; };

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/gesguerra-wzln/aws-mcp-infrastucture'

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