UNPKG

mcp-quiz-server

Version:

🧠 AI-Powered Quiz Management via Model Context Protocol (MCP) - Create, manage, and take quizzes directly from VS Code, Claude, and other AI agents.

64 lines (63 loc) • 1.7 kB
"use strict"; /** * @fileoverview MCP Tool Adapter - Clean Architecture Integration * @version 1.0.0 * @since 2025-07-29 * @module McpToolAdapter * @description Adapter to integrate existing MCP tools with Clean Architecture */ Object.defineProperty(exports, "__esModule", { value: true }); exports.McpToolAdapter = void 0; /** * Base adapter class for MCP tools using Clean Architecture */ class McpToolAdapter { constructor(container) { this.container = container; } /** * Create success response */ createSuccessResponse(data) { return { content: [ { type: 'text', text: JSON.stringify({ success: true, data, architecture: 'clean_v2', }, null, 2), }, ], _meta: { architecture: 'clean', timestamp: new Date().toISOString(), }, }; } /** * Create error response */ createErrorResponse(error, details) { return { content: [ { type: 'text', text: JSON.stringify({ success: false, error, details, architecture: 'clean_v2', }, null, 2), }, ], isError: true, _meta: { architecture: 'clean', timestamp: new Date().toISOString(), }, }; } } exports.McpToolAdapter = McpToolAdapter;