get_ticket
Retrieve full details of an existing ticket by ID from supported ITSM systems including ServiceNow, Jira, Zendesk, Ivanti Neurons, and Cherwell.
Instructions
Retrieve full details of an existing ticket by ID
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticket_id | Yes | ID of the ticket to retrieve (e.g. JIRA-1000) | |
| system | No | ITSM system to use | jira |
Implementation Reference
- index.js:113-117 (handler)The core handler function `getTicket` that retrieves a ticket from the in-memory Map by ticket_id. Returns the ticket object or an error if not found.
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 } }; } - index.js:204-222 (registration)Registration of the 'get_ticket' tool on the MCP server using `server.tool()`, including Zod schema for ticket_id input, tool annotations (readOnlyHint: true), and the async handler that calls getTicket().
server.tool( 'get_ticket', 'Retrieve full details of an existing ticket by ID', { ticket_id: z.string().describe('ID of the ticket to retrieve (e.g. JIRA-1000)'), system: systemSchema.optional(), }, { title: 'Get Ticket', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false, }, async ({ ticket_id }) => { const result = getTicket({ ticket_id }); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }, ); - Frontend service wrapper method `getTicket` that calls the MCP 'get_ticket' tool via `this.callTool()`, passing ticket_id and optionally system.
async getTicket(ticketId, system = null) { return this.callTool('get_ticket', { ticket_id: ticketId, ...(system && { system }), }); } - frontend/src/pages/MCPTicketManager.js:119-130 (registration)Frontend UI handler `handleViewTicket` that calls `mcpService.getTicket(ticketId)` and displays the result in a modal.
const handleViewTicket = async (ticketId) => { setLoading(true); setError(null); try { const result = await mcpService.getTicket(ticketId); if (result.success) { setSelectedTicket(result.ticket); setShowTicketModal(true); } else { setError(result.error || 'Failed to load ticket'); } } catch (err) {