database-mcp
Version:
Model Context Protocol server for multi-database access (PostgreSQL, MySQL, SQLite, Snowflake) with comprehensive introspection and analysis tools
35 lines • 1.3 kB
TypeScript
/**
* MCP Result Formatter
* Centralized formatting for MCP tool responses
*/
import { MCPResult } from '../types/mcp';
import { DatabaseType } from '../types/database';
/**
* Format successful MCP result
*/
export declare function formatSuccessResult(data: any, databaseType?: DatabaseType | null): MCPResult;
/**
* Format error MCP result
*/
export declare function formatErrorResult(message: string, databaseType?: DatabaseType | null): MCPResult;
/**
* Format table not found error
*/
export declare function formatTableNotFoundError(tableName: string, databaseType: DatabaseType): MCPResult;
/**
* Format column not found error
*/
export declare function formatColumnNotFoundError(columnName: string, tableName: string, databaseType: DatabaseType): MCPResult;
/**
* Format validation error
*/
export declare function formatValidationError(message: string, databaseType: DatabaseType): MCPResult;
/**
* Format query result
*/
export declare function formatQueryResult(result: any, executionTime: number, databaseType: DatabaseType, maxRows: number): MCPResult;
/**
* Format explain result
*/
export declare function formatExplainResult(query: string, executionPlan: any[], analyzed: boolean, databaseType: DatabaseType): MCPResult;
//# sourceMappingURL=result-formatter.d.ts.map