add_custom_rule
Mutates server state.
Add a custom pattern-based tech debt rule.
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
id | string | ✅ | Unique identifier for the rule |
pattern | string | ✅ | Regex pattern to match |
message | string | ✅ | Issue title/message |
severity | string `(low | medium | high |
category | string `(dependency | code-quality | architecture |
suggestion | string | — | Optional: how to fix the issue |
languages | array<string> | — | Optional: apply only to specific languages |
flags | string | — | Optional: 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_DEFINITIONSinsrc/server/tools.ts— do not edit by hand. Source: tools.ts.