Skip to main content
Glama
cloudbring

New Relic MCP Server

by cloudbring

delete_deployment

Remove deployment records from New Relic to manage application lifecycle and maintain accurate monitoring data.

Instructions

Delete a deployment record (REST v2). Requires admin role permissions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
application_idYes
idYes
confirmYes
regionNo

Implementation Reference

  • The primary handler function that validates the confirmation flag and performs the DELETE request to the New Relic REST API endpoint for deployments.
    async delete(args: DeleteDeploymentArgs): Promise<unknown> {
      if (args.confirm !== true) {
        throw new Error('delete_deployment: confirm must be true');
      }
      const client = this.restFor(args.region);
      const path = `/applications/${args.application_id}/deployments/${args.id}`;
      const res = await client.delete<unknown>(path);
      return { ...res };
    }
  • TypeScript type definition for the input parameters expected by the delete_deployment handler.
    type DeleteDeploymentArgs = {
      application_id: number;
      id: number;
      confirm: true;
      region?: Region;
    };
  • Method that returns the MCP Tool object for 'delete_deployment', including name, description, and input schema for validation.
    getDeleteTool(): Tool {
      return {
        name: 'delete_deployment',
        description: 'Delete a deployment record (REST v2). Requires admin role permissions.',
        inputSchema: {
          type: 'object',
          properties: {
            application_id: { type: 'number' },
            id: { type: 'number' },
            confirm: { type: 'boolean' },
            region: { type: 'string', enum: ['US', 'EU'] },
          },
          required: ['application_id', 'id', 'confirm'],
        },
      };
    }
  • src/server.ts:81-83 (registration)
    Includes the getDeleteTool() in the array of tools registered with the MCP server.
    restDeployments.getCreateTool(),
    restDeployments.getListTool(),
    restDeployments.getDeleteTool(),
  • Server-side dispatch logic that routes 'delete_deployment' tool calls to the RestDeploymentsTool instance's delete method.
    case 'delete_deployment':
      return await new RestDeploymentsTool().delete(
        args as Parameters<RestDeploymentsTool['delete']>[0]
      );

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