list_synthetic_monitors
Retrieve all synthetic monitors configured in New Relic to monitor application performance and availability from external locations.
Instructions
List all synthetic monitors
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"type": "object"
}
Implementation Reference
- newrelic_mcp/server.py:403-413 (handler)The MCP tool handler for 'list_synthetic_monitors'. It delegates to the NewRelicClient method and formats the response as JSON.@mcp.tool() async def list_synthetic_monitors() -> str: """List all synthetic monitors""" if not client: return json.dumps({"error": "New Relic client not initialized"}) try: result = await client.list_synthetic_monitors() return json.dumps(result, indent=2) except Exception as e: return json.dumps({"error": str(e)}, indent=2)
- newrelic_mcp/server.py:116-118 (helper)Core implementation in NewRelicClient class that performs the HTTP GET request to the Synthetics API endpoint to list monitors.async def list_synthetic_monitors(self) -> Dict[str, Any]: """List all synthetic monitors""" return await self._make_request("GET", f"{self.synthetics_url}/monitors.json")