get_synthetic_monitor
Retrieve detailed information about a specific synthetic monitor to analyze performance metrics and monitor application availability.
Instructions
Get details for a specific synthetic monitor
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| monitor_id | Yes |
Input Schema (JSON Schema)
{
"properties": {
"monitor_id": {
"title": "Monitor Id",
"type": "string"
}
},
"required": [
"monitor_id"
],
"type": "object"
}
Implementation Reference
- newrelic_mcp/server.py:416-427 (handler)MCP tool handler function for 'get_synthetic_monitor'. Checks client initialization, calls the NewRelicClient method, serializes result to JSON, handles errors.@mcp.tool() async def get_synthetic_monitor(monitor_id: str) -> str: """Get details for a specific synthetic monitor""" if not client: return json.dumps({"error": "New Relic client not initialized"}) try: result = await client.get_synthetic_monitor(monitor_id) return json.dumps(result, indent=2) except Exception as e: return json.dumps({"error": str(e)}, indent=2)
- newrelic_mcp/server.py:120-124 (helper)Helper method in NewRelicClient class that performs the actual HTTP GET request to the New Relic Synthetics API endpoint for the specified monitor_id.async def get_synthetic_monitor(self, monitor_id: str) -> Dict[str, Any]: """Get details for a specific synthetic monitor""" return await self._make_request( "GET", f"{self.synthetics_url}/monitors/{monitor_id}" )
- newrelic_mcp/server.py:416-416 (registration)The @mcp.tool() decorator registers the get_synthetic_monitor function as an MCP tool.@mcp.tool()