Skip to main content
Glama
cloudbring

New Relic MCP Server

by cloudbring

list_synthetics_monitors

Retrieve and filter all Synthetics monitors from your New Relic account to manage and monitor application performance.

Instructions

List all Synthetics monitors in your New Relic account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
target_account_idNoOptional New Relic account ID
monitor_typeNoFilter by monitor type

Implementation Reference

  • The `listSyntheticsMonitors` function implements the core logic of the tool by constructing and executing a NerdGraph query to search for synthetics monitor entities based on account ID and optional monitor type filter.
    async listSyntheticsMonitors(input: {
      target_account_id?: string;
      monitor_type?: 'SIMPLE' | 'BROWSER' | 'SCRIPT_API' | 'SCRIPT_BROWSER';
    }): Promise<Array<Record<string, unknown>>> {
      const accountId = input.target_account_id;
      if (!accountId) {
        throw new Error('Account ID must be provided');
      }
    
      let query = `domain = 'SYNTH' AND accountId = '${accountId}'`;
      if (input.monitor_type) {
        query += ` AND monitorType = '${input.monitor_type}'`;
      }
    
      const graphqlQuery = `{
        actor {
          entitySearch(query: "${query}") {
            results {
              entities {
                ... on SyntheticMonitorEntityOutline {
                  guid
                  name
                  monitorType
                  period
                  monitoredUrl
                  tags {
                    key
                    values
                  }
                }
              }
            }
          }
        }
      }`;
    
      const response = (await this.client.executeNerdGraphQuery(graphqlQuery)) as {
        data?: {
          actor?: {
            entitySearch?: {
              results?: { entities?: Array<Record<string, unknown>> };
            };
          };
        };
      };
      return response.data?.actor?.entitySearch?.results?.entities || [];
    }
  • The `getListMonitorsTool` method defines the tool's metadata, including name, description, and input schema for parameters like target_account_id and monitor_type.
    getListMonitorsTool(): Tool {
      return {
        name: 'list_synthetics_monitors',
        description: 'List all Synthetics monitors in your New Relic account',
        inputSchema: {
          type: 'object',
          properties: {
            target_account_id: {
              type: 'string',
              description: 'Optional New Relic account ID',
            },
            monitor_type: {
              type: 'string',
              enum: ['SIMPLE', 'BROWSER', 'SCRIPT_API', 'SCRIPT_BROWSER'],
              description: 'Filter by monitor type',
            },
          },
        },
      };
    }
  • src/server.ts:253-257 (registration)
    In the `executeTool` switch statement, this case registers and dispatches calls to the `listSyntheticsMonitors` handler on a new SyntheticsTool instance.
    case 'list_synthetics_monitors':
      return await new SyntheticsTool(this.client).listSyntheticsMonitors({
        ...args,
        target_account_id: accountId,
      });
  • src/server.ts:61-78 (registration)
    Instantiates the `SyntheticsTool` class and calls `getListMonitorsTool()` to register the tool definition in the server's tools map for list tools request.
    const alertTool = new AlertTool(this.client);
    const syntheticsTool = new SyntheticsTool(this.client);
    const nerdGraphTool = new NerdGraphTool(this.client);
    const restDeployments = new RestDeploymentsTool();
    const restApm = new RestApmTool();
    const restMetrics = new RestMetricsTool();
    
    // Register all tools
    const tools = [
      nrqlTool.getToolDefinition(),
      apmTool.getListApplicationsTool(),
      entityTool.getSearchTool(),
      entityTool.getDetailsTool(),
      alertTool.getPoliciesTool(),
      alertTool.getIncidentsTool(),
      alertTool.getAcknowledgeTool(),
      syntheticsTool.getListMonitorsTool(),
      syntheticsTool.getCreateMonitorTool(),
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the action ('List all Synthetics monitors') but does not disclose behavioral traits such as pagination, rate limits, authentication needs, or what happens if no monitors exist. This is a significant gap for a listing tool with zero annotation coverage.

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?

The description is a single, efficient sentence with zero waste. It is front-loaded and directly states the tool's purpose without unnecessary details, making it highly concise and well-structured.

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

Completeness2/5

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

Given no annotations and no output schema, the description is incomplete. It does not cover behavioral aspects like response format, error handling, or usage constraints. For a listing tool with potential complexity (e.g., large datasets), more context is needed to be fully helpful to an AI agent.

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 fully documents both parameters (target_account_id and monitor_type). The description does not add any meaning beyond the schema, such as explaining default behaviors or parameter interactions. Baseline 3 is appropriate when the schema handles parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('all Synthetics monitors in your New Relic account'), making the purpose unambiguous. However, it does not explicitly differentiate from sibling tools like 'list_alert_policies' or 'list_apm_applications', which also list resources but different types.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. For example, it does not mention if this is the primary way to retrieve monitors or if other tools like 'run_nerdgraph_query' might be better for complex queries. The description lacks context on prerequisites or exclusions.

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/cloudbring/newrelic-mcp'

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