Skip to main content
Glama
piekstra

New Relic MCP Server

by piekstra

get_server

Retrieve detailed information about a specific server from New Relic monitoring data to analyze performance and troubleshoot issues.

Instructions

Get details for a specific server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
server_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler for 'get_server'. This is the main function decorated with @mcp.tool() that handles the tool execution, calls the NewRelicClient.get_server method, and returns the result as JSON.
    @mcp.tool()
    async def get_server(server_id: str) -> str:
        """Get details for a specific server"""
        if not client:
            return json.dumps({"error": "New Relic client not initialized"})
    
        try:
            result = await client.get_server(server_id)
            return json.dumps(result, indent=2)
        except Exception as e:
            return json.dumps({"error": str(e)}, indent=2)
  • Helper method in NewRelicClient class that makes the actual HTTP request to the New Relic API to fetch server details by ID.
    async def get_server(self, server_id: str) -> Dict[str, Any]:
        """Get details for a specific server"""
        url = f"{self.base_url}/servers/{server_id}.json"
        return await self._make_request("GET", url)
  • The @mcp.tool() decorator registers the get_server 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 it 'gets details' but doesn't specify if this is a read-only operation, requires authentication, has rate limits, or what the output format is. This leaves significant gaps for a tool with one parameter and an output schema.

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, efficient sentence that is front-loaded with the core action. There is no wasted text, making it appropriately sized for its purpose.

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 has an output schema, the description doesn't need to explain return values. However, with no annotations and low schema coverage, it lacks details on behavior and parameter semantics. For a simple retrieval tool, this is adequate but leaves room for improvement in clarity and context.

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 schema description coverage is 0%, so the description must compensate. It implies a 'server_id' parameter is needed but doesn't add meaning beyond what the schema's title ('Server Id') provides, such as format or examples. With only one parameter, this is minimally adequate but not helpful.

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 verb ('Get') and resource ('details for a specific server'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'list_servers' or specify what 'details' include, which prevents a perfect score.

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?

No guidance is provided on when to use this tool versus alternatives such as 'list_servers' for multiple servers or other get_* tools for different resources. The description implies usage for a specific server but lacks explicit context or exclusions.

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