Skip to main content
Glama
piekstra

New Relic MCP Server

by piekstra

list_dashboards

Retrieve all dashboards for a New Relic account to monitor application performance and infrastructure metrics.

Instructions

List all dashboards for an account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler for 'list_dashboards'. This is the main entry point decorated with @mcp.tool(), which calls the client method and returns JSON response.
    @mcp.tool()
    async def list_dashboards(account_id: Optional[str] = None) -> str:
        """List all dashboards for an account"""
        if not client:
            return json.dumps({"error": "New Relic client not initialized"})
    
        try:
            result = await client.list_dashboards(account_id)
            return json.dumps(result, indent=2)
        except Exception as e:
            return json.dumps({"error": str(e)}, indent=2)
  • NewRelicClient helper method that executes the GraphQL query via nerdgraph_query to retrieve the list of dashboards for the given account.
    async def list_dashboards(self, account_id: Optional[str] = None) -> Dict[str, Any]:
        """List all dashboards for an account"""
        acc_id = account_id or self.account_id
        if not acc_id:
            raise Exception("Account ID is required for dashboard operations")
    
        query = """
        query($accountId: Int!) {
            actor {
                account(id: $accountId) {
                    dashboards {
                        results {
                            guid
                            name
                            description
                            createdAt
                            updatedAt
                            permissions
                        }
                    }
                }
            }
        }
        """
    
        variables = {"accountId": int(acc_id)}
        return await self.nerdgraph_query(query, variables)
  • The @mcp.tool() decorator registers the list_dashboards function as an MCP tool.
    @mcp.tool()
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'List all dashboards' but doesn't cover aspects like pagination, rate limits, authentication needs, or what 'all' entails (e.g., archived dashboards). This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, direct sentence with no wasted words, making it highly concise and front-loaded. It efficiently communicates the core purpose without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 optional parameter) and the presence of an output schema (which handles return values), the description is somewhat adequate. However, with no annotations and minimal parameter guidance, it lacks completeness for safe and effective use, especially regarding behavioral traits.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description mentions 'for an account', which aligns with the 'account_id' parameter in the schema. However, with 0% schema description coverage, the description doesn't add details like the parameter being optional (default null) or its format. It compensates minimally, meeting the baseline for low coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List') and resource ('dashboards for an account'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_dashboard' (singular) or 'search_entities', which might also retrieve dashboard information, leaving room for ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_dashboard' for single dashboards or 'search_entities' for broader queries, nor does it specify prerequisites or exclusions, leaving usage context unclear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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