Skip to main content
Glama

create_ticket

Create a support ticket by providing title and description. Set priority and select your ITSM system to log the issue.

Instructions

Create a new support ticket in the appropriate ITSM system

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTitle of the ticket
descriptionYesDetailed description of the issue
priorityNoPriority levelmedium
systemNoITSM system to usejira

Implementation Reference

  • index.js:92-111 (handler)
    Business logic function that creates a ticket: generates an ID, builds the ticket object with metadata (status, timestamps, assignee, comments), stores it in an in-memory Map, and returns a success response with ticket details and a URL.
    function createTicket({ title, description, priority = 'medium', system = 'jira' }) {
      const id = generateTicketId(system);
      const ticket = {
        id,
        title,
        description,
        priority,
        status: 'open',
        system,
        created_at: new Date().toISOString(),
        updated_at: new Date().toISOString(),
        assignee: null,
        comments: [],
      };
      tickets.set(id, ticket);
      return {
        success: true,
        ticket: { id, title, system, status: 'open', priority, url: `https://example.com/${system}/tickets/${id}` },
      };
    }
  • index.js:182-202 (registration)
    MCP server.tool() registration for 'create_ticket'. Registers the tool with description, Zod schema inputs (title, description, priority, system), annotation metadata, and a callback that delegates to the createTicket handler and returns the JSON result.
    server.tool(
      'create_ticket',
      'Create a new support ticket in the appropriate ITSM system',
      {
        title: z.string().describe('Title of the ticket'),
        description: z.string().describe('Detailed description of the issue'),
        priority: prioritySchema,
        system: systemSchema,
      },
      {
        title: 'Create Ticket',
        readOnlyHint: false,
        destructiveHint: false,
        idempotentHint: false,
        openWorldHint: false,
      },
      async ({ title, description, priority, system }) => {
        const result = createTicket({ title, description, priority, system });
        return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
      },
    );
  • Reusable Zod schema definitions used by create_ticket: systemSchema (enum of ITSM systems, default jira) and prioritySchema (enum of priority levels, default medium).
    const systemSchema = z
      .enum(['servicenow', 'jira', 'zendesk', 'ivanti_neurons', 'cherwell'])
      .default('jira')
      .describe('ITSM system to use');
    
    const prioritySchema = z
      .enum(['low', 'medium', 'high', 'critical'])
      .default('medium')
      .describe('Priority level');
  • Helper function that generates a ticket ID with a system-specific prefix (e.g., JIRA-, SN-, ZD-) and an auto-incrementing numeric ID.
    function generateTicketId(system = 'jira') {
      const prefixes = {
        jira: 'JIRA',
        servicenow: 'SN',
        zendesk: 'ZD',
        ivanti_neurons: 'IV',
        cherwell: 'CH',
      };
      return `${prefixes[system] ?? 'TKT'}-${nextTicketId++}`;
    }
  • Frontend MCP service method that wraps callTool('create_ticket', ...) with typed parameters for use by React components.
    /**
     * Create a ticket using MCP
     */
    async createTicket(title, description, priority = 'medium', system = 'jira') {
      return this.callTool('create_ticket', {
        title,
        description,
        priority,
        system,
      });
    }
Behavior2/5

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

Annotations provide basic hints (non-readOnly, non-destructive), but the description adds no behavioral context beyond creation. It does not disclose side effects like notifications, system validation, or error behavior, which are not covered by annotations.

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

Conciseness4/5

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

The description is a single, concise sentence. It is well-structured and gets to the point without unnecessary details, though it could be slightly expanded for clarity.

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

Completeness3/5

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

The tool is simple with 4 parameters and no output schema. The description provides enough to understand the basic action but lacks details on return values, system selection logic, or potential errors. It is minimally complete.

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?

The input schema has 100% coverage with descriptions for all parameters. The description adds no additional meaning beyond the schema, so baseline score of 3 is appropriate.

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 it creates a new support ticket in an ITSM system, with a specific verb and resource. It effectively distinguishes from sibling tools like 'get_ticket' or 'update_ticket' by focusing on creation.

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

Usage Guidelines3/5

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

The description does not explicitly state when to use this tool versus alternatives like 'add_comment' or 'assign_ticket'. It implicitly suggests it's for creating new tickets, but offers no exclusions or context for when not to use it.

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/madosh/MCP-ITSM'

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