Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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[]; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/0xjcf/MCP_CodeAnalysis'

If you have feedback or need assistance with the MCP directory API, please join our Discord server