Skip to main content
Glama
Zabbix MCP Server

Zabbix MCP Server

apmmetric_get

Read-only

Retrieves OpenTelemetry APM metric data points from Zabbix 8.0+ by required time range, metric type, flags, and resource/scope/data point attributes, with paging and field selection.

Instructions

Retrieve OpenTelemetry (OTel) APM metric data points (Zabbix 8.0+): metrics by type (0 gauge, 1 sum, 2 histogram, 3 exponential histogram) 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. For a user who is not Super admin the result is limited to the data whose resource attributes match an APM filter of one of the user's groups (usergroup 'apm_filters').

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of records to return.
typesNoReturn only data points of the given metric types: 0 gauge, 1 sum, 2 histogram, 3 exponential histogram.
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 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 (a list 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changedv1.42.2
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / extra_params / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "propertyNames": {
      +      "enum": [
      +        "countOutput",
      +        "excludeSearch",
      +        "searchByAny",
      +        "searchWildcardsEnabled",
      +        "startSearch"
      +      ]
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / filter / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "propertyNames": {
      +      "enum": [
      +        "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"
      +      ]
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / output / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "extend",
      +      "count"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "enum": [
      +        "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"
      +      ],
      +      "type": "string"
      +    },
      +    "minItems": 1,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / output / description
      Previous value: -"Properties 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."New value: +"Properties of the apmmetric object to return. Pass 'extend' for all, 'count' for the number of matches only, or a 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."
    • changedInput schema / properties / search / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "propertyNames": {
      +      "enum": [
      +        "metric_description",
      +        "metric_name",
      +        "metric_unit",
      +        "resource_schema_url",
      +        "scope_name",
      +        "scope_schema_url",
      +        "scope_version",
      +        "service_name"
      +      ]
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / sortfield / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "type",
      +      "resource_schema_url",
      +      "scope_schema_url",
      +      "scope_name",
      +      "scope_version",
      +      "service_name",
      +      "metric_name",
      +      "metric_unit",
      +      "start_time_unix",
      +      "time_unix"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "enum": [
      +        "type",
      +        "resource_schema_url",
      +        "scope_schema_url",
      +        "scope_name",
      +        "scope_version",
      +        "service_name",
      +        "metric_name",
      +        "metric_unit",
      +        "start_time_unix",
      +        "time_unix"
      +      ],
      +      "type": "string"
      +    },
      +    "minItems": 1,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / sortfield / description
      Previous value: -"Sort 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."New value: +"Sort 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 (a list for several; pair with 'sortorder'). No other property is sortable."
    • changedInput schema / properties / sortorder / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "ASC",
      +      "DESC"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "enum": [
      +        "ASC",
      +        "DESC"
      +      ],
      +      "type": "string"
      +    },
      +    "minItems": 1,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / types / description
      Previous value: -"Return only data points of the given metric types (see the APM metric object reference)."New value: +"Return only data points of the given metric types: 0 gauge, 1 sum, 2 histogram, 3 exponential histogram."
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "title": "Result",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "apmmetric_getOutput",
      -  "type": "object"
      -}New value: +null
  2. First observedv1.41.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered; the description adds real value beyond that by disclosing the permission-scoping behavior for non-Super admin users (results limited by resource attributes matching an APM filter in one of the user's groups, 'apm_filters'). It does not describe the default returned field set or result volume, though the schema's output parameter covers the former.

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?

Content is front-loaded: purpose and version first, required parameters next, filtering and paging after, alternative tool and permission caveat last. It is a fairly dense multi-sentence block, but each sentence supplies distinct information with no obvious filler.

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 21-parameter tool with no output schema, the description covers purpose, version requirement, required time arguments, the main filter families, paging, the sibling alternative and an access-control caveat. Remaining gaps (default projection, sort behavior, raw_json policy) are fully handled in the schema, so nothing critical is missing for correct invocation.

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 the schema already documents all 21 parameters in detail, including sorts, search, output and raw_json. The description adds only light framing — the type codes, the required time window, the three attribute-condition groups and limit/offset paging — which largely restates the schema. Baseline 3 is appropriate when the schema carries the semantic load.

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 opens with a specific verb and resource ('Retrieve OpenTelemetry (OTel) APM metric data points') and pins the scope with the 'Zabbix 8.0+' version qualifier and the enumerated data shape (metric_name, unit, service_name, value, attributes). It also explicitly separates itself from history_get, so an agent can distinguish it from the nearest sibling without reading either 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?

It gives a clear use condition (APM/OTel metric data on Zabbix 8.0+) and an explicit exclusion with the correct alternative: 'For Zabbix item history use history_get instead.' It does not address the other closely related siblings (apmtrace_get, apmspan_get, apmlog_get), so routing among the APM family is left to inference.

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