deepsource-mcp-server
Version:
Model Context Protocol server for DeepSource
30 lines (29 loc) • 820 B
TypeScript
/**
* @fileoverview Helper functions for tool registration and response handling.
* Provides utilities to reduce boilerplate in tool handlers.
* @packageDocumentation
*/
/**
* Parse error message if it looks like JSON
*/
export declare function parseErrorMessage(errorMessage: string): string;
/**
* Format error for consistent error handling
*/
export declare function formatError(error: unknown): string;
/**
* Log tool handler invocation
*/
export declare function logToolInvocation(toolName: string, params?: unknown): void;
/**
* Log tool handler result
*/
export declare function logToolResult(toolName: string, result: {
content?: Array<{
text?: string;
}>;
}): void;
/**
* Log and format error
*/
export declare function logAndFormatError(error: unknown, toolName: string): string;