Skip to main content
Glama

validate_rules

Verify Snort rules by checking for errors, warnings, and missing SID hygiene using actual engine runs, supporting quick write-test-fix cycles.

Instructions

Check rules with Snort itself. Give a registered rules file (rules_id) or inline rules_text. Returns errors as {line, sid, error, plain}, warnings, and workbench_lint hygiene items (e.g. a missing sid, which Snort does not report). Fast enough for a write-test-fix loop. Example: validate_rules(rules_text='alert http any any -> any any ( msg:"x"; http_uri; content:"abc"; sid:1000001; rev:1; )')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rules_idNo
rules_textNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral-disclosure burden and does well by describing return structure: errors as {line, sid, error, plain}, warnings, and workbench_lint hygiene items. It also notes that missing-sid lint coverage goes beyond Snort itself, though it does not explicitly state side effects, permissions, or whether validation is strictly read-only.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, then moves efficiently through inputs, outputs, performance, and an example. It is appropriately sized overall, though the example is somewhat long and the output-detail sentence is dense.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter validation tool with no annotations and no output schema, the description supplies the key missing context: both input modes, the shape of returned errors/warnings/lint items, and expected speed. It could still be more complete about whether rules_id and rules_text are mutually exclusive, what happens if neither is supplied, and any side effects.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does: rules_id is identified as a registered rules file, rules_text as inline rules, and the "or" phrasing makes the intended alternative input modes clear. The example further illustrates the rules_text form.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ("Check rules") and a clear method/resource ("with Snort itself"), so the core operation is unambiguous. It does not explicitly contrast itself with sibling tools such as profile_rules, test_tuning, or write_rules_file, leaving some sibling differentiation implicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase "Fast enough for a write-test-fix loop" gives a useful usage context, implying iterative rule authoring. However, it does not explicitly say when to use this versus alternatives, when not to use it, or how it relates to write_rules_file/profiling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.