Skip to main content
Glama
cloudbring

New Relic MCP Server

by cloudbring

get_entity_details

Retrieve comprehensive monitoring data for a specific New Relic entity using its GUID to analyze performance and troubleshoot issues.

Instructions

Get detailed information about a specific entity

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_guidYesThe GUID of the entity

Implementation Reference

  • Core handler function that executes a comprehensive NerdGraph GraphQL query to retrieve detailed entity information, including GUID, name, type, tags, alert violations, APM settings, relationships, and golden metrics.
    async getEntityDetails(input: { entity_guid: string }): Promise<Record<string, unknown>> {
      const graphqlQuery = `{
        actor {
          entity(guid: "${input.entity_guid}") {
            guid
            name
            type
            domain
            entityType
            reporting
            tags {
              key
              values
            }
            ... on AlertableEntity {
              alertSeverity
              recentAlertViolations {
                alertSeverity
                violationId
                openedAt
                closedAt
                violationUrl
              }
            }
            ... on ApmApplicationEntity {
              language
              settings {
                apdexTarget
              }
            }
            relationships {
              type
              target {
                entities {
                  guid
                  name
                }
              }
            }
            goldenMetrics {
              metrics {
                name
                value
                unit
              }
            }
          }
        }
      }`;
    
      const response = (await this.client.executeNerdGraphQuery(graphqlQuery)) as {
        data?: { actor?: { entity?: Record<string, unknown> } };
      };
      const entity = response.data?.actor?.entity;
    
      if (!entity) {
        throw new Error('Entity not found');
      }
    
      return entity;
    }
  • Defines the MCP Tool specification for 'get_entity_details', including name, description, and inputSchema requiring a non-empty 'entity_guid' string.
    getDetailsTool(): Tool {
      return {
        name: 'get_entity_details',
        description: 'Get detailed information about a specific entity',
        inputSchema: {
          type: 'object',
          properties: {
            entity_guid: {
              type: 'string',
              description: 'The GUID of the entity',
            },
          },
          required: ['entity_guid'],
        },
      };
    }
  • src/server.ts:57-106 (registration)
    Registers the get_entity_details tool (via entityTool.getDetailsTool()) along with other tools into the server's tools map, which is used for tool listing and discovery.
    private registerTools(): void {
      const nrqlTool = new NrqlTool(this.client);
      const apmTool = new ApmTool(this.client);
      const entityTool = new EntityTool(this.client);
      const alertTool = new AlertTool(this.client);
      const syntheticsTool = new SyntheticsTool(this.client);
      const nerdGraphTool = new NerdGraphTool(this.client);
      const restDeployments = new RestDeploymentsTool();
      const restApm = new RestApmTool();
      const restMetrics = new RestMetricsTool();
    
      // Register all tools
      const tools = [
        nrqlTool.getToolDefinition(),
        apmTool.getListApplicationsTool(),
        entityTool.getSearchTool(),
        entityTool.getDetailsTool(),
        alertTool.getPoliciesTool(),
        alertTool.getIncidentsTool(),
        alertTool.getAcknowledgeTool(),
        syntheticsTool.getListMonitorsTool(),
        syntheticsTool.getCreateMonitorTool(),
        nerdGraphTool.getQueryTool(),
        // REST v2 tools
        restDeployments.getCreateTool(),
        restDeployments.getListTool(),
        restDeployments.getDeleteTool(),
        restApm.getListApplicationsTool(),
        restMetrics.getListMetricNamesTool(),
        restMetrics.getMetricDataTool(),
        restMetrics.getListApplicationHostsTool(),
        {
          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',
              },
            },
          },
        },
      ];
    
      tools.forEach((tool) => {
        this.tools.set(tool.name, tool);
      });
    }
  • Server dispatch handler for the tool: validates the entity_guid input argument and delegates execution to EntityTool.getEntityDetails.
    case 'get_entity_details': {
      const { entity_guid } = args as Record<string, unknown>;
      if (typeof entity_guid !== 'string' || entity_guid.trim() === '') {
        throw new Error('get_entity_details: "entity_guid" (non-empty string) is required');
      }
      return await new EntityTool(this.client).getEntityDetails({ entity_guid });
    }
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. It states this is a 'Get' operation, implying read-only behavior, but doesn't disclose any behavioral traits such as authentication needs, rate limits, error handling, or what 'detailed information' includes. This leaves significant gaps for a tool with no annotation coverage.

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, efficient sentence that states the purpose directly. It's appropriately sized and front-loaded, with no wasted words, though it could benefit from more detail given the lack of annotations.

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 complexity of a tool with no annotations, no output schema, and vague purpose, the description is incomplete. It doesn't explain what 'detailed information' means, how results are structured, or any behavioral context, making it inadequate for effective agent use.

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 'entity_guid' documented as 'The GUID of the entity'. The description adds no additional meaning beyond this, as it doesn't explain parameter usage or constraints. With high schema coverage, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get detailed information about a specific entity' clearly states the verb ('Get') and resource ('entity'), but it's vague about what 'detailed information' entails and doesn't distinguish this tool from siblings like 'get_account_details' or 'search_entities'. It provides a basic purpose without specificity.

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. With siblings like 'get_account_details' and 'search_entities', the description lacks any context, prerequisites, or exclusions, leaving the agent without direction on tool selection.

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