Skip to main content
Glama
sec73
by sec73

search

Query Wazuh 5 datastreams with OpenSearch query DSL, returning raw JSON responses, aggregations, and diagnostics for empty or incomplete results.

Instructions

Run an OpenSearch query DSL request against a Wazuh 5 index pattern.

Returns the raw JSON response, including aggregations, preceded by a diagnostics block when the result needs interpretation (zero hits, a truncated total, or an aggregation that covers only part of the result set).

Common patterns:

  • wazuh-events-v5-* all events

  • wazuh-findings-v5-* all detection findings

  • wazuh-events-v5-* one of: access-management, applications, cloud-services, network-activity, other, security, system-activity, unclassified

These are datastreams. Always query the wildcard pattern, never a backing index such as .ds-wazuh-events-v5-network-activity-000001.

The time field is @timestamp. There is no timestamp field in Wazuh 5. Set "track_total_hits": true whenever you need an exact count; without it OpenSearch stops counting at 10000.

A "size" larger than WAZUH_SEARCH_MAX_SIZE (default 100) is lowered to that limit before the query is sent, and the diagnostics block says so. Use "size": 0 with aggregations to count without pulling documents.

Args: index: Index or datastream pattern, e.g. "wazuh-events-v5-network-activity*". body: OpenSearch query DSL as a JSON string.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes
indexYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Despite no annotations, the description fully discloses response behavior: raw JSON with aggregations, diagnostics block for edge cases, automatic size limit capping, and track_total_hits requirement. This goes beyond the schema to explain runtime behavior.

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 long but every section adds unique value, front-loaded with the core purpose, then organized into patterns, constraints, and parameter details. No redundant statements.

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?

Covers response format, diagnostics, index patterns, time field, size limits, and parameter details. With an output schema also present, the agent has everything needed to invoke the tool correctly.

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?

Both parameters are described with concrete examples and usage constraints. The description specifies index patterns and provides common datastream examples, while body is defined as JSON DSL with tips like track_total_hits and size:0.

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 first sentence clearly states the tool's function: running an OpenSearch query DSL request against a Wazuh 5 index pattern. It further clarifies scope with wildcard patterns and datastream constraints, making it distinct from sibling tools like schema or logtest.

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 on when to use this tool: for executing raw OpenSearch queries against Wazuh indexes. It includes guidance on wildcard patterns and size limits, but does not explicitly contrast with sibling tools or state when not to use it.

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/sec73/klaxon'

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