Skip to main content
Glama

security_events

Retrieve filtered RouterOS log entries for login, logout, authentication failures, critical errors, and system info access events so you can correlate anomalies without scanning the full log.

Instructions

Recent RouterOS log entries filtered down to security-relevant ones - login/logout/authentication-failure events (topic "account"), "critical"/"error" topic entries, and generic "system,info" rows whose message looks like a login/logout - so a caller can correlate access attempts/anomalies without reading the entire (often much larger) unfiltered log via logs.

Filtering happens in Python, same reasoning logs' topics filter already documents (RouterOS's structured API doesn't expose a query-by-field read here either) - and is applied BEFORE the limit cut, so this returns the most recent limit MATCHING entries (not the last limit raw entries filtered afterward, which would silently drop matches on a busy log).

limit must be positive and is capped at 500 (default 50), the same shape as logs' own limit.

READ-ONLY: not gated by MIKROTIK_ALLOW_WRITE.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
device_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.11.0

TDQS

A4.4/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden and does: it discloses that filtering happens in Python (not server-side), that the filter is applied BEFORE the `limit` cut so the most recent matching entries are returned rather than the last raw entries, that `limit` is capped at 500 with a default of 50, and that the tool is READ-ONLY / not gated by MIKROTIK_ALLOW_WRITE. That is precisely the behavioral detail an agent needs.

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

Conciseness3/5

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

The content is valuable but the prose is dense and runs long with nested parentheticals and cross-references. It is front-loaded with purpose but the rationale and limit explanation sprawl; tightening would improve scannability without losing information.

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 read-only, two-parameter tool with an output schema present, the description covers purpose, filtering semantics, limit behavior, and the write-gating status. The output schema means return values need not be explained. The only mild gap is no explicit description of `device_name`, but overall it is complete enough to call correctly.

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 0%, so the description must compensate. It documents `limit` thoroughly (must be positive, capped at 500, default 50) and explains the semantics of the before-filter limit cut. `device_name` is not described in the description (its meaning is inferable from the tool's purpose), which is the one gap preventing a 5.

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 states a specific verb and resource ('RouterOS log entries filtered down to security-relevant ones') and enumerates exactly which entry classes are included (account topic, critical/error, system,info login/logout rows). It explicitly distinguishes itself from the sibling `logs` tool by naming it and explaining that `security_events` exists so callers avoid reading the entire unfiltered log.

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?

Usage context is clear: use this when you need access-attempt/anomaly correlation without pulling the whole log, and use `logs` when you want everything. The description does not spell out explicit when-NOT-to-use cases (e.g., 'use logs instead if you need non-security topics'), but the implied boundary against `logs` is strong.

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

Deploy Server

Other Tools