UNPKG

heyreach-mcp-server

Version:

Production-ready Model Context Protocol server for HeyReach LinkedIn automation with comprehensive validation

49 lines (48 loc) 1.47 kB
/** * Enhanced Error Handler for HeyReach MCP Server * Based on Instantly MCP learnings - provides actionable error messages with guidance */ export interface HeyReachApiError { status?: number; message?: string; data?: any; } /** * Centralized error handler that provides actionable guidance to users */ export declare const handleHeyReachError: (error: any, toolName: string) => never; /** * Validates required parameters and provides helpful error messages */ export declare const validateRequiredParams: (params: any, required: string[], toolName: string) => void; /** * Tool dependency mapping - defines which tools should be called first */ export declare const TOOL_DEPENDENCIES: Record<string, string[]>; /** * Validates tool dependencies and provides guidance */ export declare const validateToolDependencies: (toolName: string) => string | null; /** * Validates parameter types and formats */ export declare const validateParameterTypes: (params: any, schema: Record<string, string>, toolName: string) => void; /** * Success response wrapper with consistent format */ export declare const createSuccessResponse: (data: any, message?: string) => { content: { type: "text"; text: string; }[]; }; /** * Error response wrapper with consistent format */ export declare const createErrorResponse: (error: string) => { content: { type: "text"; text: string; }[]; isError: boolean; };