list_alert_conditions
Retrieve all configured alert triggers in NinjaOne to monitor system events and manage notifications effectively.
Instructions
List all configured alert conditions (triggers) in NinjaOne.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_size | No | Number of conditions to return |
Implementation Reference
- src/tools/alerts.ts:105-119 (handler)Handler function for 'list_alert_conditions' tool - makes API call to /conditions endpoint and returns JSON results
async ({ page_size }) => { const params: Record<string, string> = { pageSize: String(page_size), }; try { const results = await client.get("/conditions", params); return toolResult(JSON.stringify(results, null, 2)); } catch (error) { return toolResult( `Error listing alert conditions: ${error}`, true, ); } }, - src/tools/alerts.ts:98-104 (schema)Input schema for 'list_alert_conditions' tool using Zod - defines optional page_size parameter with default value of 100
{ page_size: z .number() .optional() .default(100) .describe("Number of conditions to return"), }, - src/tools/alerts.ts:95-120 (registration)Complete registration of 'list_alert_conditions' tool with MCP server - includes name, description, schema, and handler
server.tool( "list_alert_conditions", "List all configured alert conditions (triggers) in NinjaOne.", { page_size: z .number() .optional() .default(100) .describe("Number of conditions to return"), }, async ({ page_size }) => { const params: Record<string, string> = { pageSize: String(page_size), }; try { const results = await client.get("/conditions", params); return toolResult(JSON.stringify(results, null, 2)); } catch (error) { return toolResult( `Error listing alert conditions: ${error}`, true, ); } }, );