get_dashboard
Retrieve detailed information for a specific New Relic dashboard using its unique identifier to access monitoring data and configuration.
Instructions
Get details for a specific dashboard
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| guid | Yes |
Input Schema (JSON Schema)
{
"properties": {
"guid": {
"title": "Guid",
"type": "string"
}
},
"required": [
"guid"
],
"type": "object"
}
Implementation Reference
- newrelic_mcp/server.py:442-453 (handler)The MCP tool handler for 'get_dashboard', decorated with @mcp.tool() for automatic registration and schema inference from type hints. It fetches dashboard data via the client and returns JSON.@mcp.tool() async def get_dashboard(guid: str) -> str: """Get details for a specific dashboard""" if not client: return json.dumps({"error": "New Relic client not initialized"}) try: result = await client.get_dashboard(guid) return json.dumps(result, indent=2) except Exception as e: return json.dumps({"error": str(e)}, indent=2)
- newrelic_mcp/server.py:213-246 (helper)NewRelicClient method that performs the actual NerdGraph GraphQL query to retrieve dashboard entity details by GUID.async def get_dashboard(self, guid: str) -> Dict[str, Any]: """Get details for a specific dashboard""" query = """ query($guid: EntityGuid!) { actor { entity(guid: $guid) { ... on DashboardEntity { guid name description createdAt updatedAt permissions pages { guid name widgets { id title visualization { id } configuration } } } } } } """ variables = {"guid": guid} return await self.nerdgraph_query(query, variables)