get_application
Retrieve detailed monitoring information for a specific New Relic application by providing its application ID to access performance metrics and observability data.
Instructions
Get details for a specific New Relic application
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_id | Yes |
Input Schema (JSON Schema)
{
"properties": {
"app_id": {
"title": "App Id",
"type": "string"
}
},
"required": [
"app_id"
],
"type": "object"
}
Implementation Reference
- newrelic_mcp/server.py:316-327 (handler)MCP tool handler for 'get_application'. This is the main entrypoint decorated with @mcp.tool(), which calls the NewRelicClient to fetch application details and returns formatted JSON.@mcp.tool() async def get_application(app_id: str) -> str: """Get details for a specific New Relic application""" if not client: return json.dumps({"error": "New Relic client not initialized"}) try: result = await client.get_application(app_id) return json.dumps(result, indent=2) except Exception as e: return json.dumps({"error": str(e)}, indent=2)
- newrelic_mcp/server.py:73-76 (helper)Helper method in NewRelicClient class that performs the actual HTTP GET request to the New Relic API to retrieve application details.async def get_application(self, app_id: str) -> Dict[str, Any]: """Get details for a specific application""" url = f"{self.base_url}/applications/{app_id}.json" return await self._make_request("GET", url)