ninja_get_tickets_by_board
Query tickets from a specific board by board ID, with pagination and sorting options to refine results.
Instructions
Query tickets on a specific ticketing board. Use ninja_list_boards to find board IDs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| boardId | Yes | Board ID | |
| pageSize | No | Max tickets to return | |
| pageIndex | No | Page index for pagination (0-based) | |
| sortBy | No | Field to sort by | |
| sortDirection | No | Sort direction |
Implementation Reference
- src/tools/ticketing.ts:137-159 (registration)Tool registration entry for 'ninja_get_tickets_by_board' as part of ticketingTools array
{ tool: { name: 'ninja_get_tickets_by_board', description: 'Query tickets on a specific ticketing board. Use ninja_list_boards to find board IDs.', inputSchema: { type: 'object', required: ['boardId'], properties: { boardId: { type: 'number', description: 'Board ID' }, pageSize: { type: 'number', description: 'Max tickets to return' }, pageIndex: { type: 'number', description: 'Page index for pagination (0-based)' }, sortBy: { type: 'string', description: 'Field to sort by' }, sortDirection: { type: 'string', enum: ['ASC', 'DESC'], description: 'Sort direction', }, }, }, }, handler: async ({ boardId, ...body }, client: NinjaOneClient) => client.post(`/ticketing/trigger/board/${boardId}/run`, body), }, - src/tools/ticketing.ts:157-158 (handler)Handler function that destructures boardId from args and makes a POST request to /ticketing/trigger/board/{boardId}/run with remaining body parameters
handler: async ({ boardId, ...body }, client: NinjaOneClient) => client.post(`/ticketing/trigger/board/${boardId}/run`, body), - src/tools/ticketing.ts:141-155 (schema)Input schema defining required boardId (number) and optional pageSize, pageIndex, sortBy, sortDirection parameters
inputSchema: { type: 'object', required: ['boardId'], properties: { boardId: { type: 'number', description: 'Board ID' }, pageSize: { type: 'number', description: 'Max tickets to return' }, pageIndex: { type: 'number', description: 'Page index for pagination (0-based)' }, sortBy: { type: 'string', description: 'Field to sort by' }, sortDirection: { type: 'string', enum: ['ASC', 'DESC'], description: 'Sort direction', }, }, }, - src/index.ts:24-24 (registration)MCP server registration: ALL_TOOLS are registered and looked up by name, the handler is invoked when the tool is called
const toolMap = new Map(ALL_TOOLS.map((def) => [def.tool.name, def.handler])); - src/tools/types.ts:4-8 (helper)ToolDef interface used by all tool definitions including ninja_get_tickets_by_board
export interface ToolDef { tool: Tool; // eslint-disable-next-line @typescript-eslint/no-explicit-any handler: (args: any, client: NinjaOneClient) => Promise<unknown>; }