ninja_reset_alert
Dismiss an alert using its unique ID and optionally attach a resolution note to the activity log.
Instructions
Reset (dismiss) an alert by its UID. Optionally provide activityData to record a resolution note.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | Alert UID | |
| activityData | No | Resolution note to attach to the activity log entry |
Implementation Reference
- src/tools/alerts.ts:23-44 (handler)The handler function for ninja_reset_alert that resets/dismisses an alert by UID. If activityData is provided, it sends a POST to /alert/{uid}/reset with the resolution note; otherwise it sends a DELETE to /alert/{uid}.
{ tool: { name: 'ninja_reset_alert', description: 'Reset (dismiss) an alert by its UID. Optionally provide activityData to record a resolution note.', inputSchema: { type: 'object', required: ['uid'], properties: { uid: { type: 'string', description: 'Alert UID' }, activityData: { type: 'string', description: 'Resolution note to attach to the activity log entry', }, }, }, }, handler: async ({ uid, activityData }, client: NinjaOneClient) => activityData ? client.post(`/alert/${uid}/reset`, { activityData }) : client.delete(`/alert/${uid}`), }, - src/tools/alerts.ts:23-39 (schema)Input schema for ninja_reset_alert tool requiring 'uid' (string) and optionally 'activityData' (string) for resolution note.
{ tool: { name: 'ninja_reset_alert', description: 'Reset (dismiss) an alert by its UID. Optionally provide activityData to record a resolution note.', inputSchema: { type: 'object', required: ['uid'], properties: { uid: { type: 'string', description: 'Alert UID' }, activityData: { type: 'string', description: 'Resolution note to attach to the activity log entry', }, }, }, }, - src/tools/alerts.ts:5-45 (registration)The ninja_reset_alert tool is defined as part of the alertTools array which is exported and then registered via ALL_TOOLS in src/tools/index.ts, which is consumed by src/index.ts to build the tool map.
export const alertTools: ToolDef[] = [ { tool: { name: 'ninja_list_alerts', description: 'Get all active alerts across all devices. Filter by source type or device filter expression.', inputSchema: { type: 'object', properties: { sourceType: { type: 'string', description: 'Alert source type filter' }, df: { type: 'string', description: 'Device filter expression' }, lang: { type: 'string', description: 'Language tag for localized messages (e.g. en)' }, tz: { type: 'string', description: 'Time zone for timestamps (e.g. America/Chicago)' }, }, }, }, handler: async (args, client: NinjaOneClient) => client.get('/alerts', clean(args)), }, { tool: { name: 'ninja_reset_alert', description: 'Reset (dismiss) an alert by its UID. Optionally provide activityData to record a resolution note.', inputSchema: { type: 'object', required: ['uid'], properties: { uid: { type: 'string', description: 'Alert UID' }, activityData: { type: 'string', description: 'Resolution note to attach to the activity log entry', }, }, }, }, handler: async ({ uid, activityData }, client: NinjaOneClient) => activityData ? client.post(`/alert/${uid}/reset`, { activityData }) : client.delete(`/alert/${uid}`), }, ];