Skip to main content
Glama

write_rules_file

Saves Snort 3 rules to a specified path without overwriting existing files; returns a diff unless overwrite=true, and never overwrites registered evidence.

Instructions

Save rules to a path you name. Existing files are never overwritten unless overwrite=true; instead a diff is returned. Registered evidence is never overwritten. Example: write_rules_file(path="~/rules/local-new.rules", rules_text="alert ...")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
overwriteNo
rules_textYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the destructive-action policy (no overwrite by default), what happens on conflict (a diff is returned rather than data loss), and a separate protection for registered evidence. It stops short of stating required permissions or whether the returned diff is the only response payload.

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?

Three short sentences plus an example, front-loaded with the core action and the most safety-relevant constraint. The example earns its place by showing both required parameters together; the 'Registered evidence is never overwritten' sentence is slightly tangential but adds a useful guardrail.

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 3-parameter write tool with no annotations and no output schema, the description covers the key behavioral risk (non-overwrite + diff return) that an agent needs before calling it. Remaining gaps are path validity rules and the full response shape, which are moderate rather than blocking.

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

Parameters3/5

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

Schema coverage is 0%, so the description must compensate, and it partially does: the semantics of 'overwrite' and the conflict behavior are spelled out, and the example demonstrates a realistic path and rules_text value. It never explains what the 'path' parameter accepts (absolute vs. relative, allowed roots) or the format expectations for rules_text, leaving meaningful ambiguity.

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 opens with a specific verb+resource ('Save rules to a path you name') and implicitly scopes it as the write counterpart to validate_rules/profile_rules in the sibling set. It never explicitly names a sibling, so an agent must infer the boundary, but the purpose itself is unambiguous.

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 overwrite rule ('never overwritten unless overwrite=true; instead a diff is returned') implies the safe-write workflow an agent would follow, and the example shows a real invocation shape. However, there is no explicit when-to-use vs. validate_rules or run_pcap guidance, and no stated prerequisites for the rules file.

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