/** * AI Agent Compatibility Scoring. * * Evaluates how well an MCP server is designed for AI agent consumption. * Scores tools based on description clarity, parameter naming, error quality, * example completeness, workflow documentation, and response predictability. */ import type { MCPTool } from '../transport/types.js'; import type { ToolFingerprint, ResponseSchemaEvolution } from './types.js'; import type { ErrorPattern } from './response-fingerprint.js'; /** * Individual component of the AI compatibility score. */ export interface ScoreComponent { /** Score value (0-100) */ score: number; /** Weight in overall score (0-1) */ weight: number; /** Weighted contribution to overall score */ weightedScore: number; /** Human-readable notes about this component */ notes: string[]; } /** * Complete AI compatibility score breakdown. */ export interface AICompatibilityScore { /** Overall score (0-100) */ overall: number; /** Letter grade */ grade: 'A' | 'B' | 'C' | 'D' | 'F'; /** Score breakdown by component */ breakdown: { descriptionClarity: ScoreComponent; parameterNaming: ScoreComponent; errorMessageQuality: ScoreComponent; exampleCompleteness: ScoreComponent; workflowDocumentation: ScoreComponent; responsePredictability: ScoreComponent; }; /** Actionable recommendations for improvement */ recommendations: AICompatibilityRecommendation[]; /** Per-tool scores for detailed analysis */ toolScores: ToolAIScore[]; } /** * A single recommendation for improving AI compatibility. */ export interface AICompatibilityRecommendation { /** Priority of this recommendation (1 = highest) */ priority: number; /** Category this recommendation addresses */ category: keyof AICompatibilityScore['breakdown']; /** Short title */ title: string; /** Detailed description */ description: string; /** Affected tools (if applicable) */ affectedTools?: string[]; /** Potential score improvement if fixed */ potentialImprovement: number; } /** * AI compatibility score for a single tool. */ export interface ToolAIScore { /** Tool name */ toolName: string; /** Overall tool score (0-100) */ score: number; /** Issues found for this tool */ issues: string[]; } /** * Input data for scoring (combines MCPTool with baseline fingerprint). */ export interface AICompatibilityInput { /** Tool definition from MCP */ tool: MCPTool; /** Fingerprint from baseline (may have additional data) */ fingerprint?: ToolFingerprint; /** Error patterns observed for this tool */ errorPatterns?: ErrorPattern[]; /** Response schema evolution data */ schemaEvolution?: ResponseSchemaEvolution; } /** * Calculate AI compatibility score for a set of tools. */ export declare function calculateAICompatibilityScore(inputs: AICompatibilityInput[]): AICompatibilityScore; /** * Generate markdown documentation for AI compatibility score. */ export declare function generateAICompatibilityMarkdown(score: AICompatibilityScore): string; //# sourceMappingURL=ai-compatibility-scorer.d.ts.map