code-auditor-mcp
Version:
Multi-language code quality auditor with MCP server - Analyze TypeScript, JavaScript, and Go code for SOLID principles, DRY violations, security patterns, and more
49 lines • 2.11 kB
TypeScript
/**
* Shared MCP Tools Logic
*
* This contains all the tool definitions and handlers that are shared
* between stdio and HTTP/UI MCP server implementations.
*/
import type { AuditResult, Violation } from './types.js';
export interface ToolParameter {
name: string;
type: 'string' | 'number' | 'boolean' | 'object' | 'array';
required: boolean;
description: string;
default?: any;
enum?: string[];
}
export interface Tool {
name: string;
description: string;
parameters: ToolParameter[];
}
export declare const tools: Tool[];
export declare const uiTools: Tool[];
/**
* Shared tool handler implementations
*/
export declare class ToolHandlers {
static handleAudit(args: any): Promise<any>;
static handleAuditHealth(args: any): Promise<any>;
static handleSearchCode(args: any): Promise<any>;
static handleFindDefinition(args: any): Promise<any>;
static handleGenerateSchemaDiscoverySQL(args: any): Promise<any>;
static handleCreateSchemaFromSqlResult(args: any): Promise<any>;
static handleAddTableManually(args: any): Promise<any>;
static handleListSchemas(args: any): Promise<any>;
static handleSearchSchemaElements(args: any): Promise<any>;
static generateSchemaDiscoveryQueries(databaseType: string, includeIndexes: boolean, includeConstraints: boolean, specificTables?: string[]): {
name: string;
sql: string;
description: string;
}[];
static buildSchemaFromSqlData(schemaName: string, databaseType: string, tablesData: any, columnsData: any, constraintsData?: any): any;
static getAllViolations(result: AuditResult): Violation[];
static calculateHealthScore(result: AuditResult): number;
static getHealthRecommendation(score: number, result: AuditResult): string;
static hasFilesWithExtensions(dirPath: string, extensions: string[]): Promise<boolean>;
static convertPolyglotToAuditResult(polyglotResult: any, auditPath: string): AuditResult;
static createFileToFunctionsMap(indexEntries: any[]): Record<string, any[]>;
}
//# sourceMappingURL=mcp-tools-shared.d.ts.map