ninja_list_scheduled_tasks
Retrieve a complete list of all scheduled automation tasks to review and manage their execution.
Instructions
List all scheduled automation tasks.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "ninja_list_scheduled_tasks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/system.ts:29-36 (handler)The handler for the 'ninja_list_scheduled_tasks' tool. It calls client.get('/tasks') to list all scheduled automation tasks via the NinjaOne API.
{ tool: { name: 'ninja_list_scheduled_tasks', description: 'List all scheduled automation tasks.', inputSchema: { type: 'object', properties: {} }, }, handler: async (_args, client: NinjaOneClient) => client.get('/tasks'), }, - src/tools/system.ts:33-33 (schema)Input schema for ninja_list_scheduled_tasks — an empty object (no parameters required).
inputSchema: { type: 'object', properties: {} }, - src/tools/index.ts:13-24 (registration)The tool is registered in ALL_TOOLS via the systemTools array export, which is collected along with other tool modules.
export const ALL_TOOLS = [ ...deviceTools, ...organizationTools, ...alertTools, ...activityTools, ...ticketingTools, ...queryTools, ...policyTools, ...userTools, ...backupTools, ...systemTools, ]; - src/index.ts:24-24 (registration)The toolMap is built in the MCP server entry point by mapping tool names to handlers, enabling dispatch of 'ninja_list_scheduled_tasks' calls.
const toolMap = new Map(ALL_TOOLS.map((def) => [def.tool.name, def.handler])); - src/client.ts:47-57 (helper)The NinjaOneClient.get() method used by the handler to make the GET /tasks API request.
async get<T = unknown>(path: string, params?: Record<string, unknown>): Promise<T> { try { const res = await this.http.get<T>(path, { params, headers: await this.authHeader(), }); return res.data; } catch (err) { throw new Error(`GET ${path} failed: ${apiError(err)}`); } }