Skip to main content
Glama
initMAX

Zabbix MCP Server

apmlog_get

Read-only

Retrieve OpenTelemetry APM log records from Zabbix 8.0+ within a required time range, filtering by trace, span, service, severity, or attributes, with paging.

Instructions

Retrieve OpenTelemetry (OTel) APM log records (Zabbix 8.0+): logs with severity_text, severity_number, body, service_name, and the trace / span they were produced in. time_from and time_till are required. Filter by traceids, spanids, trace flags (with_flags_on / with_flags_off, sum of flag values) or resource / scope / log attribute conditions. Page with limit and offset.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of records to return.
filterNoReturn only results whose properties exactly match the given values (a single value or a list of values per key). Example: {"status": 0} or {"status": [0, 1]}. Keys: body, event_name, log_attributes, resource_attributes, resource_schema_url, scope_attributes, scope_name, scope_schema_url, scope_version, service_name, severity_number, severity_text, spanid, timestamp, trace_flags, traceid. Text properties cannot be filtered; use 'search' for them.
offsetNoNumber of records to skip before returning the result (paging).
outputNoProperties of the apmlog object to return. Pass 'extend' for all, 'count' for the number of matches only, or a comma-separated list of property names. Default when omitted: timestamp, traceid, spanid, service_name, severity_text, body. Properties: body, event_name, log_attributes, resource_attributes, resource_schema_url, scope_attributes, scope_name, scope_schema_url, scope_version, service_name, severity_number, severity_text, spanid, timestamp, trace_flags, traceid.
searchNoReturn results whose string properties contain the given pattern (case-insensitive; '*' is a wildcard when searchWildcardsEnabled is true). Example: {"name": "web"}. Keys: body, event_name, resource_schema_url, scope_name, scope_schema_url, scope_version, service_name, severity_text, spanid, traceid.
serverNoTarget Zabbix server. Available: default. Defaults to 'default' if omitted.
spanidsNoReturn only log records produced during the given spans.
raw_jsonNoStrips the security disclaimer preamble from the response so it is pure JSON. Default: false. Requires the bearer token to have 'allow_raw_json' explicitly enabled by an operator in the admin portal - tokens without that policy receive a PolicyError instead. WARNING: setting true bypasses the prompt-injection mitigation marker that wraps untrusted Zabbix data (host names, item descriptions, problem text). LLM clients (Claude, GPT, Cursor, ...) should leave this false; only programmatic non-LLM consumers (Python scripts, n8n workflows that json.loads the result) should set true.
traceidsNoReturn only log records produced during the given traces.
sortfieldNoSort by one or more of: timestamp, traceid, spanid, trace_flags, severity_text, severity_number, service_name, resource_schema_url, scope_schema_url, scope_name, scope_version, event_name (comma-separated for several; pair with 'sortorder'). No other property is sortable.
sortorderNoSort order: 'ASC' or 'DESC'.
time_fromYesReturn only log records of events that occurred at or after this time (required). Unix timestamp, ISO 8601 date-time or a relative time such as now-1h or now-1d/d.
time_tillYesReturn only log records of events that occurred before this time (required). Unix timestamp, ISO 8601 date-time or a relative time such as now or now/d.
extra_paramsNoOther native apmlog.get parameters, merged into the request as-is. apmlog.get has no parameters beyond the typed ones. Any other key is refused here, because Zabbix would silently ignore it. For a parameter you are sure exists on your release but is not listed, use zabbix_raw_api_call.
with_flags_onNoReturn only records that have all of these trace flags set (sum of flag values).
log_attributesNoLog attributes: Attribute conditions as a list of {"key": ..., "value": ..., "operator": ...} objects; operators: 0 Contains, 1 Equals, 2 Not like, 3 Not equal, 4 Exists, 5 Does not exist. An empty list returns everything.
with_flags_offNoReturn only records that have none of these trace flags set (sum of flag values).
scope_attributesNoScope attributes: Attribute conditions as a list of {"key": ..., "value": ..., "operator": ...} objects; operators: 0 Contains, 1 Equals, 2 Not like, 3 Not equal, 4 Exists, 5 Does not exist. An empty list returns everything.
resource_attributesNoResource attributes: Attribute conditions as a list of {"key": ..., "value": ..., "operator": ...} objects; operators: 0 Contains, 1 Equals, 2 Not like, 3 Not equal, 4 Exists, 5 Does not exist. An empty list returns everything.
log_attributes_evaltypeNoHow the conditions in log_attributes combine: 0 = And/Or (default), 2 = Or.
scope_attributes_evaltypeNoHow the conditions in scope_attributes combine: 0 = And/Or (default), 2 = Or.
resource_attributes_evaltypeNoHow the conditions in resource_attributes combine: 0 = And/Or (default), 2 = Or.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.41.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety and reach are covered. The description adds a genuine version constraint (Zabbix 8.0+) and notes that time_from/time_till are mandatory, but otherwise restates schema content and says nothing about the raw_json security trade-off, auth needs, or result volume limits.

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?

Four sentences, front-loaded with the verb and resource, then the version gate, required params, filtering, and paging. Dense and largely waste-free for a 22-parameter tool, though the middle sentence packs many concepts into one breath.

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?

An output schema exists, so return values need no explanation, and the description covers purpose, hard requirements, filtering, and pagination. It omits any pointer to the sorting, output-projection, or raw_json behavior the schema exposes, but for a read-only listing tool with full schema coverage this is close to sufficient.

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 description coverage is 100% across all 22 parameters, so the baseline is 3. The description names a few filter dimensions (traceids, spanids, flags, attributes) and the paging pair, but adds no syntax, format, or interaction detail beyond what the schema already documents.

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?

States a specific verb (Retrieve) and resource (OpenTelemetry APM log records), and enumerates the fields carried by the records, so an agent knows this returns log entries. It does not differentiate itself from the closely related apmtrace_get / apmspan_get / apmmetric_get siblings, which share the 'apm' prefix and are easy to confuse.

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 description lists the filtering techniques available (traceids, spanids, trace flags, attribute conditions) and paging with limit/offset, which implies when the tool is useful. However, it never states when to choose this over apmtrace_get, apmspan_get, or apmmetric_get, nor any prerequisite beyond the implicit required time range.

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