Skip to main content
Glama
adm-alvin-decruz

New Relic MCP Server

query_nrql

Run NRQL queries against New Relic to retrieve monitoring data for transactions, logs, spans, and metrics. Use filters and aggregations for insights.

Instructions

Execute a NRQL query against New Relic. Common event types: Transaction, TransactionError, Span, Log, Metric, KeyTransaction, ExternalCall, SyntheticCheck, PageView, MobileSession. Tips: Use SINCE X hours/days ago for time ranges (e.g. SINCE 3 hours ago). For high-volume apps, use shorter time windows (1-3 hours) to avoid query timeouts. Use TIMESERIES for trend data over time. Use FACET for grouping results. Prefer uniqueCount() over uniques() for high-cardinality attributes. Use LIMIT to cap result rows (default is 10 for FACET queries). Time range formats: SINCE 1 hour ago, SINCE '2024-01-15 00:00:00', SINCE timestamp.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesNRQL query to execute
account_idNoNew Relic account ID (optional, uses default if not provided)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/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 disclosure burden and reveals meaningful behaviors: timeout risk for high-volume apps ('avoid query timeouts'), default result caps ('default is 10 for FACET queries'), and accepted time-range formats. It does not mention output shape or rate limits, but the safety profile of a read-only query tool is largely conveyed.

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?

The purpose is front-loaded in the first sentence, followed by a dense but purposeful run of NRQL tips; nearly every sentence addresses a common failure mode (timeouts, high-cardinality attributes, unbounded results). It is long, but for a raw query-language tool the guidance earns its place; bullet formatting would improve scannability.

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 tool that accepts arbitrary NRQL with no output schema and no annotations, the description covers event types, time-range formats, query clauses, performance constraints, and defaults — enough scaffolding for an agent to compose a valid query. Minor gaps: it does not describe the response format or how to scope by entity/app name in WHERE clauses.

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 100% for both parameters, so the schema already names query and account_id. Beyond that baseline, the description adds substantial meaning to the query parameter by teaching NRQL syntax, time-range formats, and best practices (uniqueCount() over uniques(), LIMIT caps, short windows for high-volume apps).

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 the exact action — 'Execute a NRQL query against New Relic' — with a clear verb and resource. It is unmistakably distinct from sibling CRUD tools like delete_dashboard or get_incidents, and the enumerated event types (Transaction, Span, Log) further scope what it queries.

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?

Provides rich how-to guidance (SINCE ranges, TIMESERIES, FACET, LIMIT) but no explicit when-to-use or when-not-to-use direction versus siblings such as get_app_performance or entity_search. Selection guidance is only implied: an agent must infer that raw NRQL queries belong here rather than in structured retrieval tools.

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