get_entity_details
Retrieve comprehensive details about a specific entity by providing its GUID using the New Relic MCP Server tool. Simplify entity management and data analysis.
Instructions
Get detailed information about a specific entity
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity_guid | Yes | The GUID of the entity |
Implementation Reference
- src/tools/entity.ts:103-163 (handler)Core handler function that executes a NerdGraph GraphQL query to retrieve detailed information about a New Relic entity by its GUID.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; }
- src/tools/entity.ts:37-52 (schema)Tool schema definition including name, description, and input schema requiring 'entity_guid'.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:246-252 (handler)Server-side dispatcher handler that validates input and delegates 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 }); }
- src/server.ts:72-73 (registration)Registers the get_entity_details tool (via getDetailsTool()) in the server's tools list.entityTool.getSearchTool(), entityTool.getDetailsTool(),