Skip to main content
Glama
cloudbring

New Relic MCP Server

by cloudbring

list_synthetics_monitors

Retrieve all Synthetics monitors from your New Relic account, with optional filters for account ID and monitor type.

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 main handler function for list_synthetics_monitors. It builds a GraphQL query to search for SyntheticMonitorEntityOutline entities filtered by account ID and optionally by monitor type, executes the query via NerdGraph, and returns the results.
    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 || [];
    }
  • Input schema definition for the tool (getListMonitorsTool). Defines the name 'list_synthetics_monitors', description, and inputSchema with optional 'target_account_id' (string) and 'monitor_type' (enum of SIMPLE, BROWSER, SCRIPT_API, SCRIPT_BROWSER).
    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:77-78 (registration)
    Registration of the tool in the server's registerTools method via syntheticsTool.getListMonitorsTool().
    syntheticsTool.getListMonitorsTool(),
    syntheticsTool.getCreateMonitorTool(),
  • src/server.ts:253-257 (registration)
    Tool execution dispatch in executeTool(). Routes the 'list_synthetics_monitors' case to SyntheticsTool.listSyntheticsMonitors() with target_account_id injected from the account resolution logic.
    case 'list_synthetics_monitors':
      return await new SyntheticsTool(this.client).listSyntheticsMonitors({
        ...args,
        target_account_id: accountId,
      });
  • src/server.ts:295-307 (registration)
    Registration of 'list_synthetics_monitors' in the requiresAccountId list, ensuring an account ID is validated before the tool executes.
    private requiresAccountId(toolName: string): boolean {
      const accountRequiredTools = [
        'run_nrql_query',
        'list_apm_applications',
        'search_entities',
        'get_account_details',
        'list_alert_policies',
        'list_open_incidents',
        'list_synthetics_monitors',
        'create_browser_monitor',
      ];
      return accountRequiredTools.includes(toolName);
    }
Behavior2/5

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

With no annotations, the description should disclose behavioral traits like pagination or rate limits. It only says 'list all', without addressing potential large result sets or limitations.

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 that covers the essential purpose with no extraneous words.

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?

Given no output schema and no annotations, the description is adequate for a simple list operation but lacks details on return format, pagination, or error handling.

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 baseline is 3. The description adds no extra meaning beyond the schema's parameter descriptions, which are already clear.

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 the verb 'List' and the resource 'all Synthetics monitors', effectively distinguishing it from sibling tools like list_alert_policies or list_apm_applications.

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, nor any exclusions or conditions. It simply states what it does without context.

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