Skip to main content
Glama
piekstra

New Relic MCP Server

by piekstra

get_application_metrics

Retrieve available performance metrics for a specific New Relic application to monitor and analyze application health, performance data, and operational insights.

Instructions

Get available metrics for an application

Input Schema

NameRequiredDescriptionDefault
app_idYes
namesNo

Input Schema (JSON Schema)

{ "properties": { "app_id": { "title": "App Id", "type": "string" }, "names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Names" } }, "required": [ "app_id" ], "type": "object" }

Implementation Reference

  • MCP tool handler function that calls the NewRelicClient to retrieve available metrics for a specific application and returns JSON-formatted result.
    @mcp.tool() async def get_application_metrics( app_id: str, names: Optional[List[str]] = None ) -> str: """Get available metrics for an application""" if not client: return json.dumps({"error": "New Relic client not initialized"}) try: result = await client.get_application_metrics(app_id, names) return json.dumps(result, indent=2) except Exception as e: return json.dumps({"error": str(e)}, indent=2)
  • NewRelicClient helper method that performs the HTTP GET request to New Relic API to fetch metrics data for the given application ID.
    async def get_application_metrics( self, app_id: str, names: Optional[List[str]] = None ) -> Dict[str, Any]: """Get available metrics for an application""" url = f"{self.base_url}/applications/{app_id}/metrics.json" params = {} if names: params["name"] = ",".join(names) return await self._make_request("GET", url, params=params)

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