Skip to main content
Glama
cloudbring

New Relic MCP Server

by cloudbring

get_account_details

Retrieve details for your New Relic account, optionally specifying a target account ID.

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 that executes the get_account_details tool logic. It uses the NerdGraph API to query account details (id, name) for a given 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,
      };
    }
  • The AccountDetails interface defines the return type of getAccountDetails: accountId (string), name (string), and optional region (string).
    export interface AccountDetails {
      accountId: string;
      name: string;
      region?: string;
    }
  • src/server.ts:88-100 (registration)
    Registration of the get_account_details tool with its name, description, and inputSchema (expects optional target_account_id).
    {
      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',
          },
        },
      },
    },
  • The dispatch case in executeTool that calls this.client.getAccountDetails(accountId) when the tool name is 'get_account_details'.
    case 'get_account_details':
      return await this.client.getAccountDetails(accountId);
  • src/server.ts:300-300 (registration)
    get_account_details is listed as requiring an account ID in the requiresAccountId method.
    'get_account_details',
Behavior2/5

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

With no annotations provided, the description must carry the full burden of explaining behavior. It only states 'Get' without indicating read-only nature, error handling, or permission requirements, which is insufficient for a tool that may have side effects or access controls.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no extraneous content. It is appropriately concise for a simple tool, though it could benefit from slightly more detail without losing conciseness.

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 has one optional parameter and no output schema, the description is minimally adequate. It does not cover expected return values or error conditions, but the overall simplicity makes it sufficient for a basic get operation.

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 100%, so the schema already documents the optional target_account_id. The description adds no extra meaning beyond what the schema provides, earning a baseline score of 3.

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 the resource 'New Relic account details', making the purpose understandable. It is distinct from siblings like get_entity_details, which targets different data. However, it could be more specific about what details are included.

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 such as get_entity_details. The description does not include any context about prerequisites or typical use cases, leaving the agent to infer usage.

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