ninja_configure_webhook
Configure a webhook endpoint to receive NinjaOne events. Subscribe to activity types and add HMAC secret for verification.
Instructions
Configure a webhook endpoint to receive NinjaOne events.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | HTTPS URL to receive webhook payloads | |
| secret | No | Secret for HMAC signature verification | |
| activities | No | Activity types to subscribe to |
Implementation Reference
- src/tools/system.ts:104-104 (handler)The handler for ninja_configure_webhook — makes a PUT request to /webhook with the provided args (url, secret, activities).
handler: async (args, client: NinjaOneClient) => client.put('/webhook', args), - src/tools/system.ts:87-105 (registration)The tool definition object for ninja_configure_webhook, registered as part of the systemTools array. Defines name, description, and inputSchema (schema).
tool: { name: 'ninja_configure_webhook', description: 'Configure a webhook endpoint to receive NinjaOne events.', inputSchema: { type: 'object', required: ['url'], properties: { url: { type: 'string', description: 'HTTPS URL to receive webhook payloads' }, secret: { type: 'string', description: 'Secret for HMAC signature verification' }, activities: { type: 'array', items: { type: 'string' }, description: 'Activity types to subscribe to', }, }, }, }, handler: async (args, client: NinjaOneClient) => client.put('/webhook', args), }, - src/tools/system.ts:90-101 (schema)Input schema for ninja_configure_webhook: requires 'url' (string), optional 'secret' (string), and optional 'activities' (array of strings).
inputSchema: { type: 'object', required: ['url'], properties: { url: { type: 'string', description: 'HTTPS URL to receive webhook payloads' }, secret: { type: 'string', description: 'Secret for HMAC signature verification' }, activities: { type: 'array', items: { type: 'string' }, description: 'Activity types to subscribe to', }, }, - src/tools/index.ts:23-23 (registration)systemTools is spread into ALL_TOOLS, which is the final exported array used to register all tools with MCP.
...systemTools, - src/tools/types.ts:4-8 (helper)ToolDef interface that defines the shape of each tool: a 'tool' (name, description, inputSchema) and a 'handler' function.
export interface ToolDef { tool: Tool; // eslint-disable-next-line @typescript-eslint/no-explicit-any handler: (args: any, client: NinjaOneClient) => Promise<unknown>; }