Skip to main content
Glama

get_rules

Search OSSEC detection rules to identify security events. Filter by rule ID, severity, group, or text to find matching alert criteria.

Instructions

Search and retrieve OSSEC detection rules.

OSSEC rules define what events trigger alerts. Each rule has an ID, severity level, group classification, and matching criteria.

Args: rule_id: Filter by specific rule ID (e.g., '5710' for SSH brute force). level_min: Minimum rule level (0-16). level_max: Maximum rule level (0-16). group: Filter by rule group (e.g., 'sshd', 'web', 'syslog', 'authentication_failed'). search: Free-text search in rule descriptions. filename: Filter by rule file name (e.g., 'sshd_rules.xml').

Returns: JSON array of rule objects with id, level, description, groups, and match criteria.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rule_idNo
level_minNo
level_maxNo
groupNo
searchNo
filenameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Annotations are absent, so the description carries full burden. It indicates read-only behavior ('search and retrieve') and describes the return format. However, it does not disclose potential pagination, performance considerations, or authorization needs. Acceptable but not comprehensive.

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 front-loaded with a clear purpose sentence, followed by a brief context paragraph and a cleanly formatted parameter list. Every sentence adds value, no redundancy. Highly efficient.

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?

Given 6 parameters, no enums, and an output schema, the description covers parameter details and return format well. It could specify default behavior (e.g., all rules returned when no filters) and note if results are paginated. Mostly complete.

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 coverage is 0%, so the description compensates well by listing all 6 parameters with clear explanations and examples (e.g., '5710' for rule_id, 'sshd' for group). This adds significant meaning beyond the schema's bare titles and types.

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 clearly states 'Search and retrieve OSSEC detection rules,' specifying the verb and resource. It distinguishes from sibling tools like 'get_rule_details' by focusing on search/retrieval of multiple rules, but could explicitly contrast with that tool for clarity.

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

Usage Guidelines2/5

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

No guidance on when to use this tool vs alternatives. Sibling tools like 'get_rule_details' exist but are not mentioned, leaving the agent to infer context. No when-not-to-use or prerequisite information.

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/president-xd/ossec-mcp'

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