Skip to main content
Glama
piekstra

New Relic MCP Server

by piekstra

get_dashboard

Retrieve detailed information for a specific dashboard in New Relic, enabling users to access and analyze monitoring data through programmatic API calls.

Instructions

Get details for a specific dashboard

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guidYes

Implementation Reference

  • The MCP tool handler for 'get_dashboard', decorated with @mcp.tool() for registration, which calls the NewRelicClient's get_dashboard method and serializes the result to 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)
  • The NewRelicClient method implementing the core logic to fetch dashboard details via NerdGraph GraphQL query.
    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)

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