get_ticket
Retrieve a specific Zendesk support ticket using its unique ID to access ticket details and manage support workflows.
Instructions
Retrieve a Zendesk ticket by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticket_id | Yes | The ID of the ticket to retrieve |
Implementation Reference
- The actual implementation of the get_ticket functionality in the Zendesk client.
def get_ticket(self, ticket_id: int) -> Dict[str, Any]: """ Query a ticket by its ID """ try: ticket = self.client.tickets(id=ticket_id) return { 'id': ticket.id, 'subject': ticket.subject, 'description': ticket.description, 'status': ticket.status, 'priority': ticket.priority, 'created_at': str(ticket.created_at), 'updated_at': str(ticket.updated_at), 'requester_id': ticket.requester_id, 'assignee_id': ticket.assignee_id, - src/zendesk_mcp_server/server.py:130-142 (registration)Tool definition for get_ticket in the MCP server.
name="get_ticket", description="Retrieve a Zendesk ticket by its ID", inputSchema={ "type": "object", "properties": { "ticket_id": { "type": "integer", "description": "The ID of the ticket to retrieve" } }, "required": ["ticket_id"] } ), - src/zendesk_mcp_server/server.py:324-331 (handler)The tool execution handler for get_ticket, which calls the zendesk_client method.
if name == "get_ticket": if not arguments: raise ValueError("Missing arguments") ticket = zendesk_client.get_ticket(arguments["ticket_id"]) return [types.TextContent( type="text", text=json.dumps(ticket) )]