list_users
Retrieve a complete list of all users within your New Relic account to manage access permissions and team collaboration.
Instructions
List all users in the New Relic account
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"type": "object"
}
Implementation Reference
- newrelic_mcp/server.py:619-630 (handler)The primary MCP tool handler for 'list_users'. Decorated with @mcp.tool() for registration, calls the NewRelicClient.list_users() method, handles errors, and returns JSON-formatted results.@mcp.tool() async def list_users() -> str: """List all users in the New Relic account""" if not client: return json.dumps({"error": "New Relic client not initialized"}) try: result = await client.list_users() return json.dumps(result, indent=2) except Exception as e: return json.dumps({"error": str(e)}, indent=2)
- newrelic_mcp/server.py:126-129 (helper)Supporting method in the NewRelicClient class that performs the actual API request to retrieve the list of users from New Relic (/users.json endpoint). Called by the tool handler.async def list_users(self) -> Dict[str, Any]: """List all users in the account""" url = f"{self.base_url}/users.json" return await self._make_request("GET", url)