UNPKG

@cicatriz/text-toolkit

Version:

Text Transformation & Formatting MCP Server for the Cline Marketplace

17 lines (16 loc) 591 B
/** * Utility functions for the TextToolkit MCP server */ /** * Wraps a function to handle errors and convert them to McpErrors * @param fn The function to wrap * @returns A function that handles errors */ export declare function withErrorHandling<T, R>(fn: (input: T) => R): (input: T) => R; /** * Validates that a string input is not empty * @param input The input to validate * @param fieldName The name of the field being validated * @throws McpError if the input is empty */ export declare function validateNonEmptyString(input: string | undefined, fieldName: string): void;