Skip to main content
Glama
piekstra

New Relic MCP Server

by piekstra

get_user

Retrieve detailed user information from New Relic monitoring platform by providing a user ID to access account data and permissions.

Instructions

Get details for a specific user

Input Schema

NameRequiredDescriptionDefault
user_idYes

Input Schema (JSON Schema)

{ "properties": { "user_id": { "title": "User Id", "type": "string" } }, "required": [ "user_id" ], "type": "object" }

Implementation Reference

  • The main MCP tool handler for 'get_user'. Decorated with @mcp.tool() for automatic registration. Calls the NewRelicClient.get_user method and returns formatted JSON response or error.
    @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 API request to retrieve user details from New Relic.
    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)

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