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.
40 lines (39 loc) • 2.08 kB
JavaScript
;
/**
* @moduleName: MCP Protocol Types and Interfaces
* @version: 2.0.0
* @since: 2025-07-25
* @lastUpdated: 2025-07-27
* @projectSummary: Core MCP protocol type definitions and interfaces for JSON-RPC 2.0 compliance
* @techStack: TypeScript, JSON-RPC 2.0, MCP Protocol
* @dependency: None (foundational types)
* @interModuleDependency: Used by all MCP handler modules
* @requirementsTraceability:
* {@link Requirements.REQ_MCP_005} (Protocol Type Definitions)
* {@link Requirements.REQ_MCP_006} (JSON-RPC 2.0 Message Types)
* {@link Requirements.REQ_MCP_007} (Tool and Resource Type Safety)
* {@link Requirements.REQ_PERF_005} (Type Efficiency)
* @briefDescription: Comprehensive type definitions for MCP protocol messages, tools, resources, and prompts
* @methods: Type definitions only (no runtime methods)
* @contributors: GitHub Copilot
* @examples:
* - MCPRequest: Standard JSON-RPC 2.0 request format
* - MCPResponse: Standard JSON-RPC 2.0 response format
* - ToolDefinition: MCP tool schema definition
* @vulnerabilitiesAssessment: Type-only module, no runtime vulnerabilities
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.MCPErrorCode = void 0;
// Error Codes (JSON-RPC 2.0 standard)
var MCPErrorCode;
(function (MCPErrorCode) {
MCPErrorCode[MCPErrorCode["PARSE_ERROR"] = -32700] = "PARSE_ERROR";
MCPErrorCode[MCPErrorCode["INVALID_REQUEST"] = -32600] = "INVALID_REQUEST";
MCPErrorCode[MCPErrorCode["METHOD_NOT_FOUND"] = -32601] = "METHOD_NOT_FOUND";
MCPErrorCode[MCPErrorCode["INVALID_PARAMS"] = -32602] = "INVALID_PARAMS";
MCPErrorCode[MCPErrorCode["INTERNAL_ERROR"] = -32603] = "INTERNAL_ERROR";
// MCP-specific error codes
MCPErrorCode[MCPErrorCode["RESOURCE_NOT_FOUND"] = -32001] = "RESOURCE_NOT_FOUND";
MCPErrorCode[MCPErrorCode["TOOL_EXECUTION_ERROR"] = -32002] = "TOOL_EXECUTION_ERROR";
MCPErrorCode[MCPErrorCode["CAPABILITY_NOT_SUPPORTED"] = -32003] = "CAPABILITY_NOT_SUPPORTED";
})(MCPErrorCode || (exports.MCPErrorCode = MCPErrorCode = {}));