Skip to main content
Glama
piekstra

New Relic MCP Server

by piekstra

create_deployment

Record a new application deployment in New Relic to track releases, monitor performance changes, and maintain deployment history.

Instructions

Record a new deployment for an application

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
app_idYes
revisionYes
descriptionNo
userNo
changelogNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler function that implements the 'create_deployment' tool. It builds the deployment dictionary from parameters and delegates to the NewRelicClient helper method.
    @mcp.tool()
    async def create_deployment(
        app_id: str,
        revision: str,
        description: Optional[str] = None,
        user: Optional[str] = None,
        changelog: Optional[str] = None,
    ) -> str:
        """Record a new deployment for an application"""
        if not client:
            return json.dumps({"error": "New Relic client not initialized"})
    
        try:
            deployment = {"revision": revision}
            if description:
                deployment["description"] = description
            if user:
                deployment["user"] = user
            if changelog:
                deployment["changelog"] = changelog
    
            result = await client.create_deployment(app_id, deployment)
            return json.dumps(result, indent=2)
        except Exception as e:
            return json.dumps({"error": str(e)}, indent=2)
  • Supporting utility method in the NewRelicClient class that performs the actual HTTP POST request to the New Relic API to create a deployment.
    async def create_deployment(
        self, app_id: str, deployment: Dict[str, Any]
    ) -> Dict[str, Any]:
        """Record a new deployment for an application"""
        url = f"{self.base_url}/applications/{app_id}/deployments.json"
        return await self._make_request("POST", url, json={"deployment": deployment})
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Record a new deployment' implies a write operation that creates data, but it doesn't specify whether this is idempotent, what permissions are required, how failures are handled, or what happens if duplicate deployments are recorded. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 that gets straight to the point with no wasted words. It's appropriately sized for a basic tool description and front-loads the core purpose immediately. Every word earns its place in conveying the essential action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that there's an output schema (which handles return values) but zero annotation coverage and 0% schema description coverage for 5 parameters, the description is incomplete. It adequately states what the tool does at a high level but lacks crucial details about parameter meanings, behavioral characteristics, and usage context that would make it fully helpful for an AI agent.

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

Parameters2/5

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

Schema description coverage is 0%, so all 5 parameters are undocumented in the schema. The description mentions 'application' which loosely relates to 'app_id', but provides no information about what 'revision', 'description', 'user', or 'changelog' parameters mean, their expected formats, or how they affect the deployment. The description fails to compensate for the complete lack of schema documentation.

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 action ('Record a new deployment') and resource ('for an application'), making the purpose immediately understandable. It distinguishes from sibling tools like 'list_deployments' by focusing on creation rather than listing. However, it doesn't specify what constitutes a 'deployment' in this context, leaving some ambiguity about the exact nature of the operation.

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. It doesn't mention prerequisites (e.g., needing an existing application), compare with similar tools like 'list_deployments' for checking existing deployments, or specify appropriate contexts for deployment recording. The agent must infer usage from the tool name alone.

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/piekstra/newrelic-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server