Skip to main content
Glama

update_ticket

Update the status, priority, or add a comment to an existing ticket across supported ITSM systems.

Instructions

Update the status, priority, or add a comment to an existing ticket

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ticket_idYesID of the ticket to update
statusNoNew status
priorityNoPriority levelmedium
commentNoComment to add to the ticket
systemNoITSM system to usejira

Implementation Reference

  • The business logic handler for update_ticket. Looks up ticket by ID in the in-memory Map, updates status/priority if provided, appends a comment if provided, updates the timestamp, and returns the updated ticket summary.
    function updateTicket({ ticket_id, status, priority, comment }) {
      const ticket = tickets.get(ticket_id);
      if (!ticket) return { success: false, error: `Ticket ${ticket_id} not found` };
      if (status) ticket.status = status;
      if (priority) ticket.priority = priority;
      if (comment) ticket.comments.push({ text: comment, created_at: new Date().toISOString(), internal: false });
      ticket.updated_at = new Date().toISOString();
      tickets.set(ticket_id, ticket);
      return { success: true, ticket: { id: ticket.id, title: ticket.title, status: ticket.status, priority: ticket.priority, system: ticket.system } };
    }
  • index.js:224-245 (registration)
    The MCP server tool registration for 'update_ticket' via server.tool(). Defines the name, description, Zod input schema (ticket_id, optional status enum, optional priority, optional comment, optional system), annotations, and the async handler that calls the updateTicket helper.
    server.tool(
      'update_ticket',
      'Update the status, priority, or add a comment to an existing ticket',
      {
        ticket_id: z.string().describe('ID of the ticket to update'),
        status: z.enum(['open', 'in_progress', 'resolved', 'closed']).optional().describe('New status'),
        priority: prioritySchema.optional(),
        comment: z.string().optional().describe('Comment to add to the ticket'),
        system: systemSchema.optional(),
      },
      {
        title: 'Update Ticket',
        readOnlyHint: false,
        destructiveHint: false,
        idempotentHint: false,
        openWorldHint: false,
      },
      async ({ ticket_id, status, priority, comment }) => {
        const result = updateTicket({ ticket_id, status, priority, comment });
        return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
      },
    );
  • Zod input schema for update_ticket: ticket_id (required string), status (optional enum: open/in_progress/resolved/closed), priority (optional via prioritySchema), comment (optional string), system (optional via systemSchema).
    {
      ticket_id: z.string().describe('ID of the ticket to update'),
      status: z.enum(['open', 'in_progress', 'resolved', 'closed']).optional().describe('New status'),
      priority: prioritySchema.optional(),
      comment: z.string().optional().describe('Comment to add to the ticket'),
      system: systemSchema.optional(),
    },
  • Helper service function updateTicket on the frontend MCP client service. Calls the MCP tool 'update_ticket' with ticket_id, spread updates, and optional system parameter.
    function getTicket({ ticket_id }) {
      const ticket = tickets.get(ticket_id);
      if (!ticket) return { success: false, error: `Ticket ${ticket_id} not found` };
      return { success: true, ticket: { ...ticket } };
    }
Behavior2/5

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

Annotations provide minimal behavioral info. Description only says 'update', missing details on authentication, rate limits, or side effects. Bare minimum disclosure.

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?

Single sentence, front-loaded, efficient. Minor awkwardness with 'or' list.

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?

Adequate given 5 parameters explained in schema, no output schema. Lacks explanation of updating multiple fields simultaneously, but overall covers main purpose.

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?

Schema coverage is 100%, so baseline 3. Description adds list of updatable fields but uses 'or' which could imply exclusivity, slightly misleading. No significant extra meaning.

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?

Description clearly states it updates status, priority, or adds a comment to an existing ticket, distinguishing it from siblings like create_ticket and assign_ticket.

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?

Implied usage through listing updatable fields, but no explicit guidance on when to use versus add_comment or assign_ticket, nor prerequisites.

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