Skip to main content
Glama
piekstra

New Relic MCP Server

by piekstra

get_user

Retrieve specific user details from New Relic monitoring data by providing a user ID for access control and management purposes.

Instructions

Get details for a specific user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main MCP tool handler for the 'get_user' tool. It checks if the client is initialized, calls the client's get_user method with the provided user_id, and returns the result as formatted JSON or an error message.
    @mcp.tool()
    async def get_user(user_id: str) -> str:
        """Get details for a specific user"""
        if not client:
            return json.dumps({"error": "New Relic client not initialized"})
    
        try:
            result = await client.get_user(user_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 performs the actual HTTP GET request to the New Relic API endpoint for retrieving specific user details.
    async def get_user(self, user_id: str) -> Dict[str, Any]:
        """Get details for a specific user"""
        url = f"{self.base_url}/users/{user_id}.json"
        return await self._make_request("GET", url)
  • The @mcp.tool() decorator registers the get_user function as an MCP tool with the name 'get_user'.
    @mcp.tool()
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states 'Get details' which suggests a read operation, but doesn't disclose behavioral traits like authentication needs, rate limits, error handling, or what 'details' entails. This is a significant gap for a tool with no annotation coverage.

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 with zero waste. It's appropriately sized and front-loaded, directly stating the tool's 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 (one parameter) and the presence of an output schema (which handles return values), the description is minimally adequate. However, with no annotations and incomplete behavioral disclosure, it lacks completeness for safe and effective use.

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?

Schema description coverage is 0%, but the description adds no parameter information beyond what's implied by 'specific user'. It doesn't explain the 'user_id' parameter's format, constraints, or examples. With one parameter and no schema descriptions, the baseline is 3 as it minimally covers the purpose.

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 'Get details for a specific user' clearly states the verb ('Get') and resource ('user'), and specifies it's for a 'specific' user rather than a list. However, it doesn't distinguish from sibling 'list_users' beyond the implied singular vs. plural, missing explicit differentiation.

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 like 'list_users'. The description implies it's for a specific user, but there's no explicit mention of prerequisites, when-not scenarios, or named alternatives.

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