mirror of
https://github.com/samanhappy/mcphub.git
synced 2026-01-01 12:18:39 -05:00
refactor: swap server names in mcp_settings.json and enhance comments in mcpService.ts and index.ts for clarity
This commit is contained in:
@@ -209,6 +209,8 @@ export const createMcpServer = (name: string, version: string): McpServer => {
|
||||
return new McpServer({ name, version });
|
||||
};
|
||||
|
||||
// Optimized comments to focus on key details and removed redundant explanations
|
||||
|
||||
// Helper function: Convert JSON Schema to Zod Schema
|
||||
function cast(inputSchema: unknown): ZodRawShape {
|
||||
if (typeof inputSchema !== 'object' || inputSchema === null) {
|
||||
@@ -250,7 +252,7 @@ function cast(inputSchema: unknown): ZodRawShape {
|
||||
}
|
||||
|
||||
if (prop.description) {
|
||||
zodType = zodType.describe(prop.description);
|
||||
zodType = zodType.describe(prop.description); // Add description to the schema
|
||||
}
|
||||
|
||||
processedSchema[key] = zodType.optional();
|
||||
|
||||
Reference in New Issue
Block a user