Skip to main content
Glama
cloudbring

New Relic MCP Server

by cloudbring

list_deployments_rest

Retrieve deployment history for a New Relic APM application using REST v2 API to monitor application changes and track deployment timelines.

Instructions

List deployments for an APM application (REST v2).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
application_idYes
pageNo
auto_paginateNo
regionNo

Implementation Reference

  • Core handler function that executes the list_deployments_rest tool: fetches deployments via REST API with optional pagination support.
    async list(args: ListDeploymentsArgs): Promise<unknown> {
      const client = this.restFor(args.region);
      const path = `/applications/${args.application_id}/deployments`;
      const results: unknown[] = [];
      let page = args.page;
      let nextUrl: string | undefined;
    
      do {
        const res = await client.get<unknown>(path, page ? { page } : undefined);
        results.push(res.data);
        const next = res.links?.next;
        if (args.auto_paginate && next) {
          // Extract page from next URL if present
          const u = new URL(next);
          const p = u.searchParams.get('page');
          page = p ? Number(p) : undefined;
          nextUrl = next;
        } else {
          nextUrl = undefined;
        }
      } while (args.auto_paginate && nextUrl);
    
      return {
        items: args.auto_paginate ? results : results[0],
        page: page,
      };
    }
  • Defines the tool schema including name, description, and input validation schema.
    getListTool(): Tool {
      return {
        name: 'list_deployments_rest',
        description: 'List deployments for an APM application (REST v2).',
        inputSchema: {
          type: 'object',
          properties: {
            application_id: { type: 'number' },
            page: { type: 'number' },
            auto_paginate: { type: 'boolean' },
            region: { type: 'string', enum: ['US', 'EU'] },
          },
          required: ['application_id'],
        },
      };
  • src/server.ts:81-83 (registration)
    Registers the list_deployments_rest tool by calling getListTool() on RestDeploymentsTool instance and adding to the server's tools list.
    restDeployments.getCreateTool(),
    restDeployments.getListTool(),
    restDeployments.getDeleteTool(),
  • Server-side dispatcher that invokes the tool handler upon tool call request.
    case 'list_deployments_rest':
      return await new RestDeploymentsTool().list(
        args as Parameters<RestDeploymentsTool['list']>[0]
      );
Behavior2/5

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

With no annotations provided, the description carries full burden but only states it's a list operation without disclosing behavioral traits like pagination behavior (implied by 'page' and 'auto_paginate' parameters), rate limits, authentication needs, or response format. It's minimal and misses key operational details.

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?

The description is a single, efficient sentence with zero waste, front-loaded with the core action. It's appropriately sized for a basic listing tool, making it easy to scan and understand quickly.

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 with 0% schema coverage, no annotations, and no output schema, the description is incomplete. It doesn't address parameter meanings, behavioral context, or return values, making it inadequate for effective tool selection and invocation in this complex scenario.

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%, so the description must compensate but adds no parameter information. It doesn't explain what 'application_id', 'page', 'auto_paginate', or 'region' mean, their formats, or usage, leaving all 4 parameters undocumented beyond the schema.

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 ('List') and resource ('deployments for an APM application'), specifying it uses REST v2. It distinguishes from general deployment tools but doesn't explicitly differentiate from similar listing tools like list_apm_applications_rest, which is why it's not a 5.

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?

The description provides no guidance on when to use this tool versus alternatives, such as create_deployment or delete_deployment for write operations, or other list tools like list_apm_applications_rest. It lacks context on prerequisites or exclusions, leaving usage unclear.

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