Skip to main content
Glama
welingtoncassis

newrelic-mcp-nerdgraph

run_nrql

Read-onlyIdempotent

Run NRQL queries against New Relic accounts to retrieve events, metrics, logs, or spans. Use for custom observability data when dedicated tools don't fit.

Instructions

Run a NRQL query against one or more New Relic accounts.

This is the general-purpose data tool: anything stored as events, metrics, logs or spans can be reached from here. Prefer the dedicated tools (search_logs, get_trace, get_recent_errors) when they fit, because they return a shape tuned for that use case.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesNRQL query. SINCE and LIMIT are added when absent.
account_idsNoAccounts to query. Defaults to the configured ones.
timeout_secondsNoServer-side NRQL timeout.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=true, so the safety profile is well covered by structured data. The description adds useful context about what data is reachable (events, metrics, logs, spans) and the general-purpose fallback role. However, it doesn't add much beyond annotations about behavior like rate limits, account scoping defaults, or query timeout behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the core action and scope, followed by data-type coverage and the sibling-tool routing guidance. No waste, each sentence earns its place.

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?

With an output schema present, the description needn't explain return values. Annotations cover safety and idempotence. The description covers purpose, scope, and sibling alternatives completely enough for an agent to invoke correctly. Nothing critical is missing.

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 coverage is 100%, so all three parameters are fully documented in the schema, including 'SINCE and LIMIT are added when absent', account defaults, and timeout bounds. The description adds no additional parameter syntax or semantic details beyond what the schema provides. Baseline 3 is appropriate when the schema does the heavy lifting.

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 (run a NRQL query) and clarifies scope (one or more New Relic accounts). It names sibling tools (search_logs, get_trace, get_recent_errors) that it is adjacent to, so an agent can tell it apart from alternatives without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says to prefer dedicated tools (search_logs, get_trace, get_recent_errors) when they fit, because those return tuned shapes. It frames this tool as the general-purpose fallback for anything stored as events, metrics, logs, or spans. This is clear when-to-use and when-to-prefer-alternatives guidance.

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