Skip to main content
Glama

RS.ge Waybill MCP Server

config.schema.tsโ€ข3.03 kB
/** * Configuration Schema using Zod * This provides runtime validation and TypeScript type inference */ import { z } from 'zod'; /** * Server configuration schema */ export const ServerConfigSchema = z.object({ name: z.string().min(1, 'Server name is required'), version: z.string().regex(/^\d+\.\d+\.\d+$/, 'Version must be in semver format (x.y.z)'), description: z.string().optional(), }); /** * API configuration schema */ export const ApiConfigSchema = z.object({ baseUrl: z.string().url('Base URL must be a valid URL'), timeout: z.number().int().min(5000).max(300000).default(30000), retries: z.number().int().min(0).max(5).default(3), retryDelay: z.number().int().min(1000).max(10000).default(2000), }); /** * Credentials configuration schema * Supports both direct values and environment variable references (${VAR_NAME}) */ export const CredentialsConfigSchema = z.object({ serviceUser: z.string().optional(), servicePassword: z.string().optional(), }); /** * Logging configuration schema */ export const LoggingConfigSchema = z.object({ level: z.enum(['error', 'warn', 'info', 'debug']).default('info'), file: z.string().default('logs/mcp-server.log'), console: z.boolean().default(false), // CRITICAL: Must be false for MCP servers maxSize: z.string().default('10m'), maxFiles: z.number().int().min(1).max(30).default(7), }); /** * Feature flags schema * Controls which MCP tools are enabled */ export const FeaturesConfigSchema = z.object({ getWaybills: z.boolean().default(true), saveWaybill: z.boolean().default(true), sendWaybill: z.boolean().default(true), closeWaybill: z.boolean().default(true), confirmWaybill: z.boolean().default(true), rejectWaybill: z.boolean().default(true), getErrorCodes: z.boolean().default(true), getAkcizCodes: z.boolean().default(true), getNameFromTin: z.boolean().default(true), }); /** * Customization options schema * For adapting to other SOAP APIs */ export const CustomizationConfigSchema = z.object({ dateFormat: z.string().default('YYYY-MM-DD'), soapNamespace: z.string().url().default('http://tempuri.org/'), }); /** * Main configuration schema */ export const ConfigSchema = z.object({ server: ServerConfigSchema, api: ApiConfigSchema, credentials: CredentialsConfigSchema.optional(), logging: LoggingConfigSchema.optional(), features: FeaturesConfigSchema.optional(), customization: CustomizationConfigSchema.optional(), }); /** * TypeScript type inferred from schema * This gives us type safety throughout the application */ export type Config = z.infer<typeof ConfigSchema>; export type ServerConfig = z.infer<typeof ServerConfigSchema>; export type ApiConfig = z.infer<typeof ApiConfigSchema>; export type CredentialsConfig = z.infer<typeof CredentialsConfigSchema>; export type LoggingConfig = z.infer<typeof LoggingConfigSchema>; export type FeaturesConfig = z.infer<typeof FeaturesConfigSchema>; export type CustomizationConfig = z.infer<typeof CustomizationConfigSchema>;

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/BorisSolomonia/MCPWaybill'

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