Skip to main content
Glama
cloudbring

New Relic MCP Server

by cloudbring

get_account_details

Retrieve New Relic account information to view configuration, settings, and metadata for monitoring and management purposes.

Instructions

Get New Relic account details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
target_account_idNoOptional account ID to get details for

Implementation Reference

  • The core handler function in NewRelicClient that executes a NerdGraph GraphQL query to fetch and return account details (ID and name) for the specified account ID.
    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:89-100 (registration)
    Tool registration definition including name, description, and input schema. Added to the tools array and registered via this.tools.set().
      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',
          },
        },
      },
    },
  • Input schema definition for the tool, specifying optional target_account_id parameter.
    inputSchema: {
      type: 'object' as const,
      properties: {
        target_account_id: {
          type: 'string' as const,
          description: 'Optional account ID to get details for',
        },
      },
    },
  • TypeScript interface defining the output structure of account details.
    export interface AccountDetails {
      accountId: string;
      name: string;
      region?: string;
    }
  • Server-side dispatch handler that routes the tool call to the NewRelicClient.getAccountDetails method.
    case 'get_account_details':
      return await this.client.getAccountDetails(accountId);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Get') but doesn't clarify whether this is a read-only operation, requires authentication, has rate limits, returns structured data, or handles errors. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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 wasted words. It's appropriately sized for a simple retrieval tool and front-loads the core purpose immediately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for a tool that presumably returns account details. It doesn't hint at what information is returned (e.g., account name, settings, status) or the response format, leaving the agent with insufficient context to understand the tool's full behavior.

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 input schema has 100% description coverage, with the single parameter documented as 'Optional account ID to get details for'. The description adds no additional parameter context beyond what the schema provides, so it meets the baseline score of 3 where the schema does the heavy lifting.

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 ('New Relic account details'), making the purpose unambiguous. However, it doesn't distinguish this tool from potential siblings like 'get_entity_details' or 'search_entities' that might also retrieve account-related information, preventing 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?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_entity_details' and 'search_entities' that might overlap in functionality, there's no indication of when this specific tool is appropriate or what distinguishes it from other retrieval tools in the server.

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

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