Skip to content

add_custom_rule

destructive Mutates server state.

Add a custom pattern-based tech debt rule.

Arguments

ArgumentTypeRequiredDescription
idstringUnique identifier for the rule
patternstringRegex pattern to match
messagestringIssue title/message
severitystring `(lowmediumhigh
categorystring `(dependencycode-qualityarchitecture
suggestionstringOptional: how to fix the issue
languagesarray<string>Optional: apply only to specific languages
flagsstringOptional: regex flags (g, i, m, s, etc.)

Example

json
{
  "name": "add_custom_rule",
  "arguments": {
    "id": "example",
    "pattern": "example",
    "message": "example",
    "severity": "example",
    "category": "example"
  }
}

Generated from TOOL_DEFINITIONS in src/server/tools.ts — do not edit by hand. Source: tools.ts.