Skip to main content
Glama
piekstra

New Relic MCP Server

by piekstra

create_deployment

Record new application deployments in New Relic to track release changes, monitor performance impact, and maintain deployment history for better observability.

Instructions

Record a new deployment for an application

Input Schema

NameRequiredDescriptionDefault
app_idYes
revisionYes
descriptionNo
userNo
changelogNo

Input Schema (JSON Schema)

{ "properties": { "app_id": { "title": "App Id", "type": "string" }, "changelog": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Changelog" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "revision": { "title": "Revision", "type": "string" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "User" } }, "required": [ "app_id", "revision" ], "type": "object" }

Implementation Reference

  • MCP tool handler function that validates inputs, builds the deployment payload, calls the NewRelicClient method, and returns JSON response.
    @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)
  • NewRelicClient helper method that performs the actual HTTP POST request to the New Relic API to create the 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})

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