Skip to main content
Glama
initMAX

Zabbix MCP Server

apmmetric_get

Read-only

Query OpenTelemetry APM metric data points in Zabbix 8.0+ by required time range, metric type, flags, attributes, or service; page results with limit and offset.

Instructions

Retrieve OpenTelemetry (OTel) APM metric data points (Zabbix 8.0+): metrics by type (gauge, sum, histogram, exponential histogram, summary) with metric_name, unit, service_name, value fields and attributes. time_from and time_till are required. Filter by types, flags (with_flags_on / with_flags_off) or resource / scope / data point attribute conditions. Page with limit and offset. For Zabbix item history use history_get instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of records to return.
typesNoReturn only data points of the given metric types (see the APM metric object reference).
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: aggregation_temporality, attributes, bucket_counts, count, exemplars, explicit_bounds, flags, is_monotonic, max, metric_description, metric_name, metric_unit, min, negative_bucket_counts, negative_offset, positive_bucket_counts, positive_offset, resource_attributes, resource_schema_url, scale, scope_attributes, scope_name, scope_schema_url, scope_version, service_name, start_time_unix, sum, time_unix, type, value, zero_count. Text properties cannot be filtered; use 'search' for them.
offsetNoNumber of records to skip before returning the result (paging).
outputNoProperties of the apmmetric 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: time_unix, type, service_name, metric_name, metric_unit, value. Properties: aggregation_temporality, attributes, bucket_counts, count, exemplars, explicit_bounds, flags, is_monotonic, max, metric_description, metric_name, metric_unit, min, negative_bucket_counts, negative_offset, positive_bucket_counts, positive_offset, resource_attributes, resource_schema_url, scale, scope_attributes, scope_name, scope_schema_url, scope_version, service_name, start_time_unix, sum, time_unix, type, value, zero_count.
searchNoReturn results whose string properties contain the given pattern (case-insensitive; '*' is a wildcard when searchWildcardsEnabled is true). Example: {"name": "web"}. Keys: metric_description, metric_name, metric_unit, resource_schema_url, scope_name, scope_schema_url, scope_version, service_name.
serverNoTarget Zabbix server. Available: default. Defaults to 'default' if omitted.
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.
sortfieldNoSort by one or more of: type, resource_schema_url, scope_schema_url, scope_name, scope_version, service_name, metric_name, metric_unit, start_time_unix, time_unix (comma-separated for several; pair with 'sortorder'). No other property is sortable.
sortorderNoSort order: 'ASC' or 'DESC'.
time_fromYesReturn only data points whose time is 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 data points whose time is before this time (required). Unix timestamp, ISO 8601 date-time or a relative time such as now or now/d.
attributesNoAttributes: 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.
extra_paramsNoOther native apmmetric.get parameters, merged into the request as-is. apmmetric.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 data points that have all of these flags set (sum of flag values).
with_flags_offNoReturn only data points that have none of these 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.
attributes_evaltypeNoHow the conditions in attributes combine: 0 = And/Or (default), 2 = Or.
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.
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.9/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 the safety profile is covered. The description adds the Zabbix-8.0+ applicability and names the required time window, but does not disclose pagination limits, default result size, or filtering cost beyond what the schema states. With annotations carrying safety, a 3 is appropriate.

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?

A single dense paragraph that front-loads the resource and its identity fields, then covers filtering, paging, and the sibling exclusion. No wasted sentences, though the prose is packed tightly.

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 structure need not be re-explained, and the description still names the key returned fields and the required time window. For a 21-parameter tool the description adequately signals the main facets; only the sibling routing for other APM types is thin.

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%, so every parameter is already documented, including the filter/search/output keys and the required time_from/time_till formats. The description restates the same facets (types, flags, attributes, limit/offset) without adding syntax or constraints beyond the schema. Baseline 3 applies.

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?

States a specific verb and resource ('Retrieve OpenTelemetry (OTel) APM metric data points') and enumerates the metric types and identifying fields (metric_name, unit, service_name, value, attributes). It also names the sibling it is not ('For Zabbix item history use history_get instead'), so an agent can distinguish it from history_get/apmtrace_get without opening a schema.

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?

Gives an explicit when-not with a named alternative ('For Zabbix item history use history_get instead') and states the version gate (Zabbix 8.0+). It does not disambiguate against the other APM siblings (apmtrace_get, apmspan_get, apmlog_get), so it is clear but not fully routing.

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