Skip to main content
Glama
piekstra

New Relic MCP Server

by piekstra

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

NameRequiredDescriptionDefault
monitor_idYes

Input Schema (JSON Schema)

{ "properties": { "monitor_id": { "title": "Monitor Id", "type": "string" } }, "required": [ "monitor_id" ], "type": "object" }

Implementation Reference

  • 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)
  • 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}" )
  • The @mcp.tool() decorator registers the get_synthetic_monitor function as an MCP tool.
    @mcp.tool()

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

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