Skip to main content
Glama

ninja_create_ticket

Create a support ticket by providing client, ticket form, subject, status, and requester. Optionally add location, device, technician, description, type, severity, priority, tags, or parent ticket.

Instructions

Create a new support ticket. Use ninja_list_ticket_forms to find ticketFormId and ninja_list_ticket_statuses for valid status values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYesOrganization (client) ID
ticketFormIdYesTicket form ID
subjectYesTicket subject line
requesterUidYesUUID of the contact or user requesting the ticket
statusYesStatus ID (use ninja_list_ticket_statuses; default "1000" = Open)
locationIdNoLocation ID to associate
nodeIdNoDevice ID to associate
descriptionNoTicket body content
typeNoTicket type
severityNoTicket severity
priorityNoTicket priority
assignedAppUserIdNoTechnician user ID to assign
tagsNoTicket tags
parentTicketIdNoParent ticket ID (for sub-tickets)

Implementation Reference

  • The handler function that executes the tool logic by making a POST request to /ticketing/ticket with the provided arguments.
    handler: async (args, client: NinjaOneClient) => client.post('/ticketing/ticket', args),
  • The inputSchema defining validation rules and required parameters for ninja_create_ticket: clientId, ticketFormId, subject, status, requesterUid are required; optional fields include locationId, nodeId, description, type, severity, priority, assignedAppUserId, tags, parentTicketId.
    inputSchema: {
      type: 'object',
      required: ['clientId', 'ticketFormId', 'subject', 'status', 'requesterUid'],
      properties: {
        clientId: { type: 'number', description: 'Organization (client) ID' },
        ticketFormId: { type: 'number', description: 'Ticket form ID' },
        subject: { type: 'string', maxLength: 200, description: 'Ticket subject line' },
        requesterUid: { type: 'string', description: 'UUID of the contact or user requesting the ticket' },
        status: { type: 'string', description: 'Status ID (use ninja_list_ticket_statuses; default "1000" = Open)' },
        locationId: { type: 'number', description: 'Location ID to associate' },
        nodeId: { type: 'number', description: 'Device ID to associate' },
        description: {
          type: 'object',
          description: 'Ticket body content',
          properties: {
            public: { type: 'boolean', description: 'Whether visible to end users' },
            body: { type: 'string', description: 'Plain text body' },
            htmlBody: { type: 'string', description: 'HTML body (use instead of body for rich text)' },
          },
        },
        type: {
          type: 'string',
          enum: ['PROBLEM', 'QUESTION', 'INCIDENT', 'TASK', 'CHANGE_REQUEST', 'SERVICE_REQUEST', 'PROJECT', 'APPOINTMENT', 'MISCELLANEOUS'],
          description: 'Ticket type',
        },
        severity: {
          type: 'string',
          enum: ['NONE', 'MINOR', 'MODERATE', 'MAJOR', 'CRITICAL'],
          description: 'Ticket severity',
        },
        priority: {
          type: 'string',
          enum: ['NONE', 'LOW', 'MEDIUM', 'HIGH'],
          description: 'Ticket priority',
        },
        assignedAppUserId: { type: 'number', description: 'Technician user ID to assign' },
        tags: { type: 'array', items: { type: 'string' }, description: 'Ticket tags' },
        parentTicketId: { type: 'number', description: 'Parent ticket ID (for sub-tickets)' },
      },
    },
  • The tool definition is part of the ticketingTools array exported from src/tools/ticketing.ts. This array is then spread into ALL_TOOLS in src/tools/index.ts (line 18), which is presumably registered with the MCP server.
    {
      tool: {
        name: 'ninja_create_ticket',
        description: 'Create a new support ticket. Use ninja_list_ticket_forms to find ticketFormId and ninja_list_ticket_statuses for valid status values.',
        inputSchema: {
          type: 'object',
          required: ['clientId', 'ticketFormId', 'subject', 'status', 'requesterUid'],
          properties: {
            clientId: { type: 'number', description: 'Organization (client) ID' },
            ticketFormId: { type: 'number', description: 'Ticket form ID' },
            subject: { type: 'string', maxLength: 200, description: 'Ticket subject line' },
            requesterUid: { type: 'string', description: 'UUID of the contact or user requesting the ticket' },
            status: { type: 'string', description: 'Status ID (use ninja_list_ticket_statuses; default "1000" = Open)' },
            locationId: { type: 'number', description: 'Location ID to associate' },
            nodeId: { type: 'number', description: 'Device ID to associate' },
            description: {
              type: 'object',
              description: 'Ticket body content',
              properties: {
                public: { type: 'boolean', description: 'Whether visible to end users' },
                body: { type: 'string', description: 'Plain text body' },
                htmlBody: { type: 'string', description: 'HTML body (use instead of body for rich text)' },
              },
            },
            type: {
              type: 'string',
              enum: ['PROBLEM', 'QUESTION', 'INCIDENT', 'TASK', 'CHANGE_REQUEST', 'SERVICE_REQUEST', 'PROJECT', 'APPOINTMENT', 'MISCELLANEOUS'],
              description: 'Ticket type',
            },
            severity: {
              type: 'string',
              enum: ['NONE', 'MINOR', 'MODERATE', 'MAJOR', 'CRITICAL'],
              description: 'Ticket severity',
            },
            priority: {
              type: 'string',
              enum: ['NONE', 'LOW', 'MEDIUM', 'HIGH'],
              description: 'Ticket priority',
            },
            assignedAppUserId: { type: 'number', description: 'Technician user ID to assign' },
            tags: { type: 'array', items: { type: 'string' }, description: 'Ticket tags' },
            parentTicketId: { type: 'number', description: 'Parent ticket ID (for sub-tickets)' },
          },
        },
      },
      handler: async (args, client: NinjaOneClient) => client.post('/ticketing/ticket', args),
    },
  • Imports used: NinjaOneClient (HTTP client performing the POST request), clean (utility for cleaning params), and ToolDef (type interface defining tool shape with tool and handler properties).
    import { NinjaOneClient } from '../client.js';
    import { clean } from '../utils.js';
    import { ToolDef } from './types.js';
    
    export const ticketingTools: ToolDef[] = [
      {
        tool: {
          name: 'ninja_create_ticket',
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must cover behavioral traits. It only states the action ('Create'), lacking details on permissions, side effects, idempotency, rate limits, or what happens post-creation. This is insufficient for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core purpose, and contains no redundant information. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (14 parameters, nested objects) and lack of output schema, the description is too brief. It does not explain return values, defaults, or relationships among parameters, leaving significant gaps for an AI agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All parameters have descriptions in the schema (100% coverage), so baseline is 3. The description adds minimal extra value by hinting at ticketFormId and status via references to list tools, but does not elaborate on any parameter beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and the resource ('a new support ticket'), effectively differentiating from sibling tools like ninja_add_ticket_comment or ninja_update_ticket. It is specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit references to ninja_list_ticket_forms and ninja_list_ticket_statuses for obtaining valid IDs, offering practical guidance. However, it does not mention when not to use this tool (e.g., for updates or comments) or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Allied-Business-Solutions/ninjaone-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server