Skip to main content
Glama
cloudbring

New Relic MCP Server

by cloudbring

delete_deployment

Delete a deployment record using the New Relic REST v2 API. Requires admin role permissions.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
application_idYes
idYes
confirmYes
regionNo

Implementation Reference

  • The delete handler function that executes the delete_deployment tool logic. It checks the confirm flag, constructs the REST API path, and calls client.delete().
    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 };
    }
  • Type definition (DeleteDeploymentArgs) for the delete_deployment tool's input parameters: application_id, id, confirm, and optional region.
    type DeleteDeploymentArgs = {
      application_id: number;
      id: number;
      confirm: true;
      region?: Region;
    };
  • getDeleteTool() returns the Tool definition including name 'delete_deployment', description, and JSON Schema input validation (application_id, id, confirm, region).
    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:83-83 (registration)
    Tool registration: getDeleteTool() is called and added to the tools array in registerTools().
    restDeployments.getDeleteTool(),
  • src/server.ts:183-186 (registration)
    Case handler in server.ts that routes the 'delete_deployment' tool call to RestDeploymentsTool.delete().
    case 'delete_deployment':
      return await new RestDeploymentsTool().delete(
        args as Parameters<RestDeploymentsTool['delete']>[0]
      );
  • The delete method on NewRelicRestClient that performs the HTTP DELETE request to the New Relic REST API v2.
    async delete<T>(path: string): Promise<RestResponse<T>> {
      const url = this.buildUrl(path);
      const response = await fetch(url, {
        method: 'DELETE',
        headers: {
          'Content-Type': 'application/json',
          'Api-Key': this.apiKey,
        },
      });
      const links = parseLinkHeader(response.headers.get('link'));
      const data = (await response.json()) as T;
      if (!response.ok) {
        throw new Error(`REST API error: ${response.status} ${response.statusText}`);
      }
      return { status: response.status, data, links, url };
    }
Behavior4/5

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

Clearly indicates destructive nature ('Delete') and permission requirement. Without annotations, description is transparent about core behavior, though lacks details on reversibility or side effects.

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?

Single sentence with essential information front-loaded; no wasted words.

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 4 parameters, a required boolean 'confirm', and no output schema, description lacks sufficient detail for an agent to confidently invoke the tool without additional info.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the tool description provides no explanation of parameters (application_id, id, confirm, region). Agents cannot infer parameter meaning from description.

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

Purpose5/5

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

Description clearly states the action ('Delete') and resource ('deployment record'), with API version noted. Distinguishes from siblings like create_deployment and list_deployments_rest.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Mentions required admin role permissions but does not provide guidance on when to use this tool versus alternatives, nor exclusions or prerequisites beyond role.

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