systemprompt-mcp-core
Version:
A specialized Model Context Protocol (MCP) server that integrates with systemprompt.io to provide powerful prompt management capabilities. This server enables seamless creation, management, and versioning of system prompts and agents through MCP. It works
39 lines • 1.68 kB
JavaScript
export const ERROR_MESSAGES = {
INVALID_REQUEST: {
MISSING_MESSAGES: "Invalid request: missing messages",
MISSING_PARAMS: "Request must have params",
EMPTY_MESSAGES: "Request must have at least one message",
},
VALIDATION: {
INVALID_ROLE: 'Message role must be either "user" or "assistant"',
MISSING_CONTENT: "Message must have a content object",
INVALID_CONTENT_TYPE: 'Content type must be either "text" or "image"',
INVALID_TEXT_CONTENT: "Text content must have a string text field",
INVALID_IMAGE_DATA: "Image content must have a base64 data field",
INVALID_IMAGE_MIME: "Image content must have a mimeType field",
INVALID_MAX_TOKENS: "maxTokens must be a positive number",
INVALID_TEMPERATURE: "temperature must be a number between 0 and 1",
INVALID_INCLUDE_CONTEXT: 'includeContext must be "none", "thisServer", or "allServers"',
INVALID_MODEL_PRIORITY: "Model preference priorities must be numbers between 0 and 1",
},
SAMPLING: {
EXPECTED_TEXT: "Expected text response from LLM",
UNKNOWN_CALLBACK: "Unknown callback type: ",
REQUEST_FAILED: "Sampling request failed: ",
},
};
export const VALID_ROLES = ["user", "assistant"];
export const VALID_CONTENT_TYPES = ["text", "image", "resource"];
export const VALID_INCLUDE_CONTEXT = [
"none",
"thisServer",
"allServers",
];
export const XML_TAGS = {
REQUEST_PARAMS_CLOSE: "</requestParams>",
EXISTING_CONTENT_TEMPLATE: (content) => `</requestParams>
<existingContent>
${content}
</existingContent>`,
};
//# sourceMappingURL=message-handler.js.map