format_rules
Rewrite Sigma YAML into a canonical layout while preserving comments, anchors, aliases, tags, and directives; a semantic guard verifies values before returning or saving the result.
Instructions
Rewrite Sigma YAML into the canonical layout: four-space indentation, block collections, canonical key order, and normalized scalar quoting. Comments keep their text and their attachment, and anchors, aliases, tags, and directives are preserved. A semantic guard reparses the result and refuses the rewrite unless YAML values, parsed rules, correlations, filters, parser diagnostics, comment attachment, anchors, aliases, tags, directives, and action values all match. Returns the formatted YAML and whether it changed. Non-Sigma documents are reported as skipped. With write: true (only valid with a file path, and only when the server runs with --rules-dir) the change is persisted to disk.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "format_rules"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Path to a single Sigma YAML file. Mutually exclusive with `yaml`. | |
| yaml | No | Inline Sigma YAML. Mutually exclusive with `path`. | |
| write | No | Persist the formatted YAML back to disk. Only valid with a `path` input, and only when the server has a rules root (`--rules-dir`). |