create_deployment
Create deployment markers for APM applications to track releases and changes in New Relic.
Instructions
Create a deployment marker for an APM application (REST v2).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| application_id | Yes | ||
| revision | Yes | ||
| changelog | No | ||
| description | No | ||
| user | No | ||
| region | No |
Implementation Reference
- src/tools/rest/deployments.ts:52-65 (handler)The core handler function that executes the tool logic by posting to the New Relic REST API to create a deployment marker for an APM application.async create(args: CreateDeploymentArgs): Promise<unknown> { const client = this.restFor(args.region); const path = `/applications/${args.application_id}/deployments`; const payload = { deployment: { revision: args.revision, changelog: args.changelog, description: args.description, user: args.user, }, }; const res = await client.post<unknown>(path, payload); return { ...res }; }
- src/tools/rest/deployments.ts:33-50 (schema)Defines the tool's name, description, and input schema for validation.getCreateTool(): Tool { return { name: 'create_deployment', description: 'Create a deployment marker for an APM application (REST v2).', inputSchema: { type: 'object', properties: { application_id: { type: 'number' }, revision: { type: 'string' }, changelog: { type: 'string' }, description: { type: 'string' }, user: { type: 'string' }, region: { type: 'string', enum: ['US', 'EU'] }, }, required: ['application_id', 'revision'], }, }; }
- src/tools/rest/deployments.ts:4-11 (schema)TypeScript type definition for the input arguments used in the handler.type CreateDeploymentArgs = { application_id: number; revision: string; changelog?: string; description?: string; user?: string; region?: Region; };
- src/server.ts:175-178 (registration)Registers the handler execution in the main tool dispatcher switch statement.case 'create_deployment': return await new RestDeploymentsTool().create( args as Parameters<RestDeploymentsTool['create']>[0] );
- src/server.ts:81-81 (registration)Registers the tool definition (from getCreateTool) into the server's tools map for listing.restDeployments.getCreateTool(),