Skip to main content
Glama
yunusemregul

dynatrace-bridge-mcp

by yunusemregul

query_metrics

Query Dynatrace metrics for any chart and get per-series summaries—min, avg, max, last value, trend, and readable values over time. Scope by entity and time.

Instructions

Runs a Dynatrace metric query (the data behind any chart) and returns each series summarised: min, avg, max with its timestamp, last value, trend, and a compact table of values over time. Values are converted to readable units (µs → ms/s, bytes → MiB/GiB) from the unit of the metric descriptor; when Dynatrace names no unit, or the descriptor cannot be read, the values are printed raw and the output says so. The descriptor describes the plain metric, so after a transformation that changes the unit (:rate, :count, arithmetic) read the numbers with that in mind.

selector uses the Dynatrace metric selector language: a metric id plus optional transformations, e.g.

  • builtin:service.response.time:percentile(95)

  • builtin:service.errors.total.rate:splitBy("dt.entity.service"):sort(value(avg,descending)):limit(10):names

  • builtin:containers.memory.residentSetBytes:splitBy("dt.entity.container_group_instance"):max:names Several selectors can be given comma-separated. Append :names so entity names are shown next to their ids. Find metric ids with find_metrics.

Scope to entities with entity_selector (entitySelector syntax), e.g. entityId("SERVICE-1234567890ABCDEF") or type(HOST),entityName.contains("web"). resolution sets the point spacing (1m, 5m, 1h, 1d, or Inf for a single value over the window); by default Dynatrace picks one that fits the window.

This tool runs through the Dynatrace Bridge browser extension in the user's logged-in browser. If it fails, report the error to the user; do not try to open browser tabs or use browser automation instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
time_toNoAbsolute end time, ISO 8601; without a zone it is read as UTC. Without time_from, the window starts minutes_lookback before this. Must not be in the future.
selectorYesMetric selector: metric id with optional transformations (:avg, :max, :percentile(95), :splitBy("dimension"), :filter(...), :sort(...), :limit(n), :names, :rate(1m), …).
time_fromNoAbsolute start time, ISO 8601 (e.g. '2026-09-23T10:28:00Z'). A timestamp without a zone (Z or ±hh:mm) is read as UTC. Without time_to, the window runs from here to now. Must not be in the future.
max_seriesNoMaximum series summarised per metric, ranked by average. Default 10, at most 50.
resolutionNoPoint spacing: '1m', '5m', '1h', '1d', a point count like '60', or 'Inf' for one aggregated value. Default: chosen by Dynatrace for the window.
environmentNoWhich Dynatrace environment to query, as named in the Dynatrace Bridge extension popup. Omit it for the default, the first environment configured there. The names are not listed here because the extension had not connected yet when this description was built; `dynatrace_bridge_status` lists them.
entity_selectorNoOptional entitySelector limiting the entities the metric is read for, e.g. `entityId("HOST-1234567890ABCDEF")`.
minutes_lookbackNoWindow length in minutes. Default 120. With neither time_from nor time_to it means the last N minutes up to now; with only time_to it means the N minutes ending at time_to; ignored when time_from is given. The response header always shows the resolved absolute UTC window.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses execution through the Dynatrace Bridge browser extension in the logged-in browser, instructs on failure handling (report the error, do not automate a browser), and explains unit-conversion behavior including the raw-value fallback and the caveat that transformations like ':rate' change units. It does not spell out auth/permission prerequisites or rate limits, so it falls just short of 5.

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?

Long but well-organized and front-loaded: purpose and return shape come first, then selector syntax, scoping, resolution, and the execution caveat. The bulleted examples earn their space as they are the core invocation skill, though the description is on the edge of verbose.

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?

For an 8-parameter tool with no output schema, the description still explains the return summary, unit handling, the browser-extension execution path, and failure behavior, while the input schema covers every parameter. An agent has everything needed to invoke and interpret it 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 coverage is already 100%, so baseline is 3, but the description adds real meaning: the metric selector language with transformation examples, resolution point-spacing semantics ('Inf' for a single value, default chosen by Dynatrace), and how the time window resolves. This goes beyond the schema's terse per-parameter strings.

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 ('Runs a Dynatrace metric query') and immediately clarifies scope ('the data behind any chart') plus exactly what is returned (min/avg/max, timestamp, last value, trend, table). It is unmistakably distinct from the sibling discovery tool find_metrics, which it explicitly names.

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 concrete usage guidance: how to build a selector with three worked examples, the ':names' tip, entity scoping via entity_selector, resolution semantics, and routes metric-id discovery to find_metrics. It stops short of explicit when-not-to-use guidance against analytical siblings such as analyze_response_time or service_overview.

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