ninja_get_integrity_check_jobs
Retrieve backup integrity check job results with device filtering and pagination support.
Instructions
Get backup integrity check job results.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| df | No | Device filter expression | |
| pageSize | No | Max results to return | |
| cursor | No | Pagination cursor from previous response |
Implementation Reference
- src/tools/backup.ts:35-36 (handler)The handler function for ninja_get_integrity_check_jobs. It makes a GET request to '/backup/integrity-check-jobs' with cleaned query parameters via the NinjaOneClient.
handler: async (args, client: NinjaOneClient) => client.get('/backup/integrity-check-jobs', clean(args)), - src/tools/backup.ts:23-33 (schema)The tool definition including name ('ninja_get_integrity_check_jobs'), description, and inputSchema (df, pageSize, cursor).
tool: { name: 'ninja_get_integrity_check_jobs', description: 'Get backup integrity check job results.', inputSchema: { type: 'object', properties: { df: { type: 'string', description: 'Device filter expression' }, pageSize: { type: 'number', description: 'Max results to return' }, cursor: { type: 'string', description: 'Pagination cursor from previous response' }, }, }, - src/tools/index.ts:3-22 (registration)The backupTools array (containing this tool's definition) is exported from 'backup.ts' and spread into ALL_TOOLS, which is used by the MCP server to register tools.
import { backupTools } from './backup.js'; import { deviceTools } from './devices.js'; import { organizationTools } from './organizations.js'; import { policyTools } from './policies.js'; import { queryTools } from './queries.js'; import { systemTools } from './system.js'; import { ticketingTools } from './ticketing.js'; import { userTools } from './users.js'; export type { ToolDef } from './types.js'; export const ALL_TOOLS = [ ...deviceTools, ...organizationTools, ...alertTools, ...activityTools, ...ticketingTools, ...queryTools, ...policyTools, ...userTools, ...backupTools, - src/utils.ts:2-5 (helper)The 'clean' utility removes null/empty values from args before passing them as query parameters to the API call.
export function clean(args: Record<string, any>): Record<string, unknown> { return Object.fromEntries( Object.entries(args).filter(([, v]) => v != null && v !== ''), ); - src/index.ts:24-24 (registration)The main server entry point builds a toolMap from ALL_TOOLS, mapping tool name to handler, and dispatches incoming CallToolRequest calls to the appropriate handler.
const toolMap = new Map(ALL_TOOLS.map((def) => [def.tool.name, def.handler]));