Skip to main content
Glama
thrashy

New Relic MCP Server

by thrashy

add_widget_to_dashboard

Add a widget to an existing New Relic dashboard by providing the dashboard GUID, NRQL query, and optional advanced chart display settings and grid placement.

Instructions

Add a widget to an existing dashboard (requires dashboard GUID and widget configuration).

Use the optional raw_configuration parameter to control advanced chart display settings. When provided, it is sent as rawConfiguration to NerdGraph and takes precedence over the typed configuration. The raw_configuration object should include nrqlQueries plus any display options.

IMPORTANT: nrqlQueries uses accountIds (array) not accountId (scalar): "nrqlQueries": [{"accountIds": [123456], "query": "SELECT ..."}] This is auto-populated from widget_query if omitted.

Fixed Y-Axis Range (left axis): {"yAxisLeft": {"min": 0, "max": 500, "zero": false}}

Dual Y-Axis (second axis on right): IMPORTANT: dual y-axis requires the COMPLETE rawConfiguration (not just yAxisRight). NR automatically appends an aggregation suffix to series names: percentile() → " (99%)", average() → no suffix. The alias in the query should NOT include the suffix — NR adds it. Use the rendered name in series[].name. Example — query alias is 'My Series', NR renders it as 'My Series (99%)' for percentile():

{
  "nrqlQueries": [{"accountIds": [123456], "query": "SELECT count(*) AS 'Left', percentile(duration, 99) AS 'My Series' FROM ... TIMESERIES"}],
  "chartStyles": {"lineInterpolation": "linear"},
  "facet": {"showOtherSeries": false},
  "legend": {"enabled": true},
  "markers": {"displayedTypes": {"criticalViolations": false, "deployments": true, "relatedDeployments": true, "warningViolations": false}},
  "platformOptions": {"ignoreTimeRange": false},
  "thresholds": {"isLabelVisible": true},
  "yAxisLeft": {"zero": true},
  "yAxisRight": {"zero": true, "series": [{"name": "My Series (99%)"}]}
}

Hide Legend: {"legend": {"enabled": false}}

Facet - show/hide Other series: {"facet": {"showOtherSeries": true}}

Ignore dashboard time picker: {"platformOptions": {"ignoreTimeRange": true}}

Threshold label visibility (shows/hides threshold labels on chart): {"thresholds": {"isLabelVisible": true}}

Chart line style: {"chartStyles": {"lineInterpolation": "linear"}} (or "step", "smooth")

Deployment markers: {"markers": {"displayedTypes": {"deployments": true, "relatedDeployments": true, "criticalViolations": false, "warningViolations": false}}}

Combined example (fixed range + no legend):

{
  "nrqlQueries": [{"accountIds": [123456], "query": "SELECT count(*) FROM Log TIMESERIES"}],
  "yAxisLeft": {"min": 0, "max": 1000, "zero": true},
  "legend": {"enabled": false}
}

Note: logarithmic scale is not supported by New Relic for line/area charts.

Placement (layout): dashboards use a 12-column grid (column is 1-based; height 1 ≈ one billboard row, charts are usually 3). Without layout, New Relic auto-places the widget full-size at the bottom — fine for one-offs, wrong for designed dashboards. Compact KPI billboard: {"column": 1, "row": 1, "width": 2, "height": 2}; chart in a 3-across row: {"column": 5, "row": 4, "width": 4, "height": 3}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dashboard_guidYesGUID of the dashboard to add widget to
widget_titleYesTitle for the widget
widget_queryYesNRQL query for the widget
widget_typeNoType of widget (line, area, bar, pie, table, billboard, etc.)line
raw_configurationNoAdvanced chart display configuration sent as rawConfiguration to NerdGraph. Must include 'nrqlQueries' array with accountIds (array, not scalar). Supports: yAxisLeft ({min, max, zero}), yAxisRight ({zero, series:[{name}]}), legend ({enabled}), facet ({showOtherSeries}), platformOptions ({ignoreTimeRange}), thresholds ({isLabelVisible}), chartStyles ({lineInterpolation: linear/step/smooth}), markers ({displayedTypes: {deployments, relatedDeployments, criticalViolations, warningViolations}}). Note: logarithmic scale is NOT supported. Overrides the typed configuration when provided.
layoutNoWidget placement on the dashboard's 12-column grid. Omit to let New Relic auto-place (full-size, bottom of page).
Behavior3/5

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

No annotations are provided, so the description carries full burden. It explains behaviors of raw_configuration and layout, including important caveats (accountIds plural, dual y-axis requirements). However, it does not disclose whether the tool is a pure mutation, permission requirements, side effects (e.g., overwriting), or error handling. Moderate transparency.

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 description is relatively long but well-structured with sections for raw_configuration, layout, and multiple examples. Each section provides distinct value. However, some redundancy (e.g., repeated notes on accountIds) could be trimmed. Overall, it is appropriately sized for the complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no output schema and 6 parameters, the description thoroughly explains input parameters but does not cover return value (e.g., widget GUID), error scenarios, or confirmation of success. This leaves the agent unsure of what to expect after invocation. Could be more complete.

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?

Input schema covers all 6 parameters with 100% description coverage, providing baseline. The description adds significant value beyond schema by including concrete JSON examples, auto-population hints, and caveats (e.g., accountIds vs accountId, y-axis left/right, legend hiding). This aids correct parameter construction.

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 clearly states 'Add a widget to an existing dashboard' with specific required inputs (dashboard GUID and widget configuration). It distinguishes from sibling tools like create_dashboard or delete_widget by focusing on adding to an existing dashboard.

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?

The description implies usage (adding widgets to existing dashboards) but does not explicitly state when to use this tool versus alternatives like create_dashboard (for initial dashboard creation) or update_widget (for modifying existing widgets). No exclusion criteria or prerequisites are mentioned.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thrashy/mcp-newrelic'

If you have feedback or need assistance with the MCP directory API, please join our Discord server