ninja_get_ticket_form
Get details of a ticket form and its fields by providing the ticket form ID.
Instructions
Get details of a specific ticket form including its fields.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Ticket form ID |
Implementation Reference
- src/tools/ticketing.ts:197-199 (handler)The handler function for 'ninja_get_ticket_form' that destructures 'id' from args and makes a GET request to /ticketing/ticket-form/{id} via the NinjaOneClient.
handler: async ({ id }, client: NinjaOneClient) => client.get(`/ticketing/ticket-form/${id}`), }, - src/tools/ticketing.ts:189-195 (schema)The input schema for 'ninja_get_ticket_form' requiring an 'id' (number) property.
inputSchema: { type: 'object', required: ['id'], properties: { id: { type: 'number', description: 'Ticket form ID' }, }, }, - src/tools/ticketing.ts:185-199 (registration)The tool definition registration entry within the ticketingTools array, defining the tool name, description, inputSchema, and handler.
{ tool: { name: 'ninja_get_ticket_form', description: 'Get details of a specific ticket form including its fields.', inputSchema: { type: 'object', required: ['id'], properties: { id: { type: 'number', description: 'Ticket form ID' }, }, }, }, handler: async ({ id }, client: NinjaOneClient) => client.get(`/ticketing/ticket-form/${id}`), }, - src/tools/index.ts:13-24 (registration)The ticketingTools array is spread into ALL_TOOLS, which is the central registration of all tools including 'ninja_get_ticket_form'.
export const ALL_TOOLS = [ ...deviceTools, ...organizationTools, ...alertTools, ...activityTools, ...ticketingTools, ...queryTools, ...policyTools, ...userTools, ...backupTools, ...systemTools, ]; - src/tools/types.ts:4-8 (helper)The ToolDef interface defining the shape of a tool definition, including the 'tool' (name, description, inputSchema) and 'handler' function.
export interface ToolDef { tool: Tool; // eslint-disable-next-line @typescript-eslint/no-explicit-any handler: (args: any, client: NinjaOneClient) => Promise<unknown>; }