list-quality-rules
Execute and manage quality rules for code analysis using the CodeAnalysis MCP Server to enhance syntax accuracy and optimize development workflows.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/features/code-quality/index.ts:46-69 (registration)Registration of the "list-quality-rules" MCP tool, including the inline handler function that retrieves and returns the quality rules as JSON text.// Register the list-quality-rules tool server.tool( "list-quality-rules", {}, async () => { try { const rules = getQualityRules(); return { content: [{ type: "text", text: JSON.stringify(rules, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving quality rules: ${(error as Error).message}` }], isError: true }; } } );
- Helper function called by the tool handler to retrieve a copy of all registered QualityRule definitions from the ruleRegistry.export function getQualityRules(): QualityRule[] { return [...ruleRegistry]; }
- TypeScript interface defining the structure of each quality rule object returned by the tool.interface QualityRule { id: string; name: string; description: string; languages: string[]; severity: 'error' | 'warning' | 'info'; analyze: (content: string, filePath: string, lineIndex?: number) => QualityIssue[]; }