list-mode-rules
Lists all lexer rules in a specified ANTLR4 mode to inspect contents, debug issues, and understand mode structure.
Instructions
List all lexer rules in a specific mode.
When to use: Quick inspection of mode contents, debugging mode issues, understanding mode structure.
Returns:
List of rules with names, patterns, and line numbers
Total count of rules in the mode
Example - List rules in STRING_MODE: mode_name: "STRING_MODE"
Example - List rules in DEFAULT_MODE: mode_name: "DEFAULT_MODE"
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mode_name": "<mode_name>"
},
"name": "list-mode-rules"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from_file | No | Optional: path to a grammar file to read | |
| mode_name | Yes | Name of the mode to list rules from | |
| grammar_content | No | The ANTLR4 grammar file content |