UNPKG

mushcode-mcp-server

Version:

A specialized Model Context Protocol server for MUSHCODE development assistance. Provides AI-powered code generation, validation, optimization, and examples for MUD development.

183 lines 6.34 kB
[ { "id": "basic-command", "name": "Basic Command", "description": "A simple command that responds to user input", "category": "command", "codeTemplate": "&CMD.%{COMMAND_NAME} %{OBJECT}=$+%{command_name} *:@pemit %#=%{response_message}", "parameters": [ { "name": "command_name", "type": "string", "description": "Name of the command", "required": true }, { "name": "response_message", "type": "string", "description": "Message to display to user", "required": true } ], "serverCompatibility": ["PennMUSH", "TinyMUSH", "RhostMUSH"], "securityLevel": "public", "examples": [ "&CMD.HELLO me=$+hello *:@pemit %#=Hello, %0!" ], "relatedPatterns": [], "tags": ["basic", "command", "user-input"], "difficulty": "beginner", "createdAt": "2024-01-01T00:00:00.000Z", "updatedAt": "2024-01-01T00:00:00.000Z" }, { "id": "function-with-validation", "name": "Function with Input Validation", "description": "A function that validates input parameters before processing", "category": "function", "codeTemplate": "&FUN.%{FUNCTION_NAME} %{OBJECT}=[switch(words(%0),0,#-1 ERROR: No input provided,gt(words(%0),5),#-1 ERROR: Too many parameters,%{function_body})]", "parameters": [ { "name": "function_name", "type": "string", "description": "Name of the function", "required": true }, { "name": "function_body", "type": "string", "description": "Main function logic", "required": true } ], "serverCompatibility": ["PennMUSH", "TinyMUSH", "RhostMUSH"], "securityLevel": "public", "examples": [ "&FUN.ADDNUMS me=[switch(words(%0),0,#-1 ERROR: No input provided,gt(words(%0),2),#-1 ERROR: Too many parameters,add(first(%0),last(%0)))]" ], "relatedPatterns": [], "tags": ["function", "validation", "error-handling"], "difficulty": "intermediate", "createdAt": "2024-01-01T00:00:00.000Z", "updatedAt": "2024-01-01T00:00:00.000Z" }, { "id": "trigger-on-connect", "name": "Connection Trigger", "description": "A trigger that executes when a player connects", "category": "trigger", "codeTemplate": "&ACONNECT %{OBJECT}=@pemit %#=%{welcome_message};@trigger me/TR.LOG.CONNECT=%#", "parameters": [ { "name": "welcome_message", "type": "string", "description": "Message to show on connect", "required": true } ], "serverCompatibility": ["PennMUSH", "TinyMUSH", "RhostMUSH"], "securityLevel": "builder", "examples": [ "&ACONNECT me=@pemit %#=Welcome to the game, [name(%#)]!;@trigger me/TR.LOG.CONNECT=%#" ], "relatedPatterns": [], "tags": ["trigger", "connect", "welcome"], "difficulty": "intermediate", "createdAt": "2024-01-01T00:00:00.000Z", "updatedAt": "2024-01-01T00:00:00.000Z" }, { "id": "secure-admin-command", "name": "Secure Admin Command", "description": "An administrative command with permission checking", "category": "command", "codeTemplate": "&CMD.%{COMMAND_NAME} %{OBJECT}=$+%{command_name} *:@switch orflags(%#,Ww)=0,{@pemit %#=Permission denied.},{%{admin_action}}", "parameters": [ { "name": "command_name", "type": "string", "description": "Name of the admin command", "required": true }, { "name": "admin_action", "type": "string", "description": "Action to perform with admin privileges", "required": true } ], "serverCompatibility": ["PennMUSH", "TinyMUSH", "RhostMUSH"], "securityLevel": "wizard", "examples": [ "&CMD.SHUTDOWN me=$+shutdown *:@switch orflags(%#,Ww)=0,{@pemit %#=Permission denied.},{@shutdown %0}" ], "relatedPatterns": [], "tags": ["admin", "security", "permissions"], "difficulty": "advanced", "createdAt": "2024-01-01T00:00:00.000Z", "updatedAt": "2024-01-01T00:00:00.000Z" }, { "id": "data-storage-attribute", "name": "Data Storage Attribute", "description": "An attribute for storing and retrieving structured data", "category": "attribute", "codeTemplate": "&DATA.%{DATA_NAME} %{OBJECT}=%{initial_value}\n&FUN.GET_%{DATA_NAME} %{OBJECT}=[get(me/DATA.%{DATA_NAME})]\n&FUN.SET_%{DATA_NAME} %{OBJECT}=[set(me,DATA.%{DATA_NAME}:%0)]", "parameters": [ { "name": "data_name", "type": "string", "description": "Name of the data attribute", "required": true }, { "name": "initial_value", "type": "string", "description": "Initial value for the data", "required": false, "defaultValue": "" } ], "serverCompatibility": ["PennMUSH", "TinyMUSH", "RhostMUSH"], "securityLevel": "builder", "examples": [ "&DATA.SCORES me=\n&FUN.GET_SCORES me=[get(me/DATA.SCORES)]\n&FUN.SET_SCORES me=[set(me,DATA.SCORES:%0)]" ], "relatedPatterns": [], "tags": ["data", "storage", "attribute"], "difficulty": "beginner", "createdAt": "2024-01-01T00:00:00.000Z", "updatedAt": "2024-01-01T00:00:00.000Z" }, { "id": "utility-string-processor", "name": "String Processing Utility", "description": "A utility function for processing and formatting strings", "category": "utility", "codeTemplate": "&FUN.%{UTILITY_NAME} %{OBJECT}=[switch(%0,,#-1 ERROR: No input,iter(%0,%{processing_logic},|,|)]", "parameters": [ { "name": "utility_name", "type": "string", "description": "Name of the utility function", "required": true }, { "name": "processing_logic", "type": "string", "description": "Logic for processing each element", "required": true } ], "serverCompatibility": ["PennMUSH", "TinyMUSH", "RhostMUSH"], "securityLevel": "public", "examples": [ "&FUN.CAPITALIZE me=[switch(%0,,#-1 ERROR: No input,iter(%0,capstr(##),|,|)]" ], "relatedPatterns": [], "tags": ["utility", "string", "processing"], "difficulty": "intermediate", "createdAt": "2024-01-01T00:00:00.000Z", "updatedAt": "2024-01-01T00:00:00.000Z" } ]