Skip to main content
Glama

tune_rules

Generate a Sigma filter rule from false-positive and true-positive events, preserving true positives while minimizing false positives. Returns YAML, rationale, clusters, coverage, and verification.

Instructions

Propose a spec-native Sigma filter rule from false-positive and true-positive JSON event arrays. Rules come from inline yaml or a path confined to --rules-dir; select the target with rule when needed. Optional pipelines transform the target before tuning. The result includes filter YAML, field rationale, clusters, coverage, and closed before/after verification. No proposal may suppress a true positive.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoSigma file or directory path. Confined to `--rules-dir` when configured.
ruleNoTarget rule id, falling back to an exact title.
yamlNoInline Sigma YAML. Mutually exclusive with `path`.
authorNoFilter author metadata.
filter_idNoCaller-supplied filter id. Omit to leave the YAML id unset.
pipelinesNoProcessing pipelines as builtin names or confined file paths.
max_fieldsNoMaximum fields in one selection.
min_fieldsNoMinimum fields required in every emitted selection.
max_clustersNoMaximum selections in the emitted filter.
allow_partialNoPermit verified partial FP coverage.
true_positivesYesKnown true-positive events that the filter must preserve.
false_positivesYesEvents confirmed as false positives.
min_cluster_supportNoMinimum FP events required for every emitted selection.
max_value_cardinalityNoMaximum exact values in one OR list.
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool proposes (not mutates) a rule, includes verification ('closed before/after verification'), enforces a hard constraint ('No proposal may suppress a true positive'), and outlines the result components (filter YAML, field rationale, clusters, coverage). It doesn't mention auth or rate limits, but the non-destructive 'propose' nature is clear.

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

Conciseness5/5

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

The description is two sentences, front-loads the primary purpose, and packs essential behavioral and output details without redundancy. Every clause adds value, and the structure is easy to scan.

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

Completeness5/5

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

For a tool with 14 parameters and no output schema, this description is remarkably complete. It covers inputs, source selection, optional transformation, output contents, and a critical invariant. The schema covers the parameter details, so the description needs only focus on high-level behavior and constraints, which it does thoroughly.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds meaningful context for key parameters by explaining the sources (inline `yaml` or `path`), target selection (`rule`), and the optional role of `pipelines`. This goes beyond the schema's field descriptions, particularly in clarifying the relationship between `yaml` and `path`.

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

Purpose5/5

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

The description clearly states a specific verb ('Propose') and resource ('spec-native Sigma filter rule') with explicit inputs (false-positive and true-positive JSON event arrays). It distinguishes this tool from siblings like `validate_rules` or `convert_rules` by focusing on filter rule generation from FP/TP data.

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

Usage Guidelines4/5

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

The description provides clear context for how the tool is used (via inline yaml or path confined to --rules-dir, optional pipelines, target selection with rule) and implies the use case of tuning rules against event arrays. It doesn't explicitly mention when not to use it or name alternatives, but the context is strong enough for an agent to infer applicability.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/timescale/rsigma'

If you have feedback or need assistance with the MCP directory API, please join our Discord server