UNPKG

syia-mcp-utils

Version:

Global utility functions for MCP server

19 lines (18 loc) 522 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseDocumentLink = parseDocumentLink; /** * Parse a document link and extract relevant information */ function parseDocumentLink(link) { // Parse the document link format: type-id-timestamp const parts = link.split('-'); if (parts.length !== 3) { throw new Error('Invalid document link format'); } return { documentType: parts[0], documentId: parts[1], timestamp: parts[2] }; }