Skip to main content
Glama
cloudbring

New Relic MCP Server

by cloudbring

get_account_details

Retrieve New Relic account details, including optional account ID, to manage data queries, incidents, synthetic monitoring, and deployments via the MCP Server.

Instructions

Get New Relic account details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
target_account_idNoOptional account ID to get details for

Implementation Reference

  • Core handler function that executes the NerdGraph GraphQL query to fetch account details.
    async getAccountDetails(accountId?: string): Promise<AccountDetails> { const id = accountId || this.defaultAccountId; if (!id) { throw new Error('Account ID must be provided'); } type AccountResponse = { actor?: { account?: { id: string; name: string } } }; const query = `{ actor { account(id: ${id}) { id name } } }`; const response = (await this.executeNerdGraphQuery<AccountResponse>( query )) as GraphQLResponse<AccountResponse>; if (!response.data?.actor?.account) { throw new Error(`Account ${id} not found`); } return { accountId: response.data.actor.account.id, name: response.data.actor.account.name, }; }
  • src/server.ts:88-100 (registration)
    Tool registration in the tools array, including name, description, and input schema.
    { name: 'get_account_details', description: 'Get New Relic account details', inputSchema: { type: 'object' as const, properties: { target_account_id: { type: 'string' as const, description: 'Optional account ID to get details for', }, }, }, },
  • Dispatch handler in executeTool method that calls the client implementation.
    case 'get_account_details': return await this.client.getAccountDetails(accountId);
  • TypeScript interface defining the output structure of getAccountDetails.
    export interface AccountDetails { accountId: string; name: string; region?: string; }

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/cloudbring/newrelic-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server