Skip to main content
Glama

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
NameRequiredDescriptionDefault
ticket_idYesThe 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,
  • 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"]
        }
    ),
  • 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)
        )]

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/kdopenshaw/zendesk-mcp-server'

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