Skip to main content
Glama

update_ticket

Modify existing Zendesk tickets by updating status, priority, assignee, tags, or custom fields to manage support workflows and track issue resolution.

Instructions

Update fields on an existing Zendesk ticket (e.g., status, priority, assignee_id)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ticket_idYesThe ID of the ticket to update
subjectNo
statusNonew, open, pending, on-hold, solved, closed
priorityNolow, normal, high, urgent
typeNo
assignee_idNo
requester_idNo
tagsNo
custom_fieldsNo
due_atNoISO8601 datetime

Implementation Reference

  • The implementation of the `update_ticket` method in the Zendesk client, which handles the logic for updating ticket fields via the Zenpy library.
    def update_ticket(self, ticket_id: int, **fields: Any) -> Dict[str, Any]:
        """
        Update a Zendesk ticket with provided fields using Zenpy.
    
        Supported fields include common ticket attributes like:
        subject, status, priority, type, assignee_id, requester_id,
        tags (list[str]), custom_fields (list[dict]), due_at, etc.
        """
        try:
            # Load the ticket, mutate fields directly, and update
            ticket = self.client.tickets(id=ticket_id)
            for key, value in fields.items():
                if value is None:
                    continue
                setattr(ticket, key, value)
    
            # This call returns a TicketAudit (not a Ticket). Don't read attrs from it.
            self.client.tickets.update(ticket)
    
            # Fetch the fresh ticket to return consistent data
            refreshed = self.client.tickets(id=ticket_id)
    
            return {
                'id': refreshed.id,
                'subject': refreshed.subject,
                'description': refreshed.description,
                'status': refreshed.status,
                'priority': refreshed.priority,
                'type': getattr(refreshed, 'type', None),
                'created_at': str(refreshed.created_at),
                'updated_at': str(refreshed.updated_at),
                'requester_id': refreshed.requester_id,
                'assignee_id': refreshed.assignee_id,
                'organization_id': refreshed.organization_id,
                'tags': list(getattr(refreshed, 'tags', []) or []),
            }
        except Exception as e:
            raise Exception(f"Failed to update ticket {ticket_id}: {str(e)}")
  • Registration of the `update_ticket` tool with its input schema.
    types.Tool(
        name="update_ticket",
        description="Update fields on an existing Zendesk ticket (e.g., status, priority, assignee_id)",
        inputSchema={
            "type": "object",
            "properties": {
                "ticket_id": {"type": "integer", "description": "The ID of the ticket to update"},
                "subject": {"type": "string"},
                "status": {"type": "string", "description": "new, open, pending, on-hold, solved, closed"},
                "priority": {"type": "string", "description": "low, normal, high, urgent"},
                "type": {"type": "string"},
                "assignee_id": {"type": "integer"},
                "requester_id": {"type": "integer"},
                "tags": {"type": "array", "items": {"type": "string"}},
                "custom_fields": {"type": "array", "items": {"type": "object"}},
                "due_at": {"type": "string", "description": "ISO8601 datetime"}
            },
            "required": ["ticket_id"]
        }
    ),
  • Handler logic in `server.py` that processes the `update_ticket` tool call and invokes the Zendesk client.
    elif name == "update_ticket":
        if not arguments:
            raise ValueError("Missing arguments")
        ticket_id = arguments.get("ticket_id")
        if ticket_id is None:
            raise ValueError("ticket_id is required")
        update_fields = {k: v for k, v in arguments.items() if k != "ticket_id"}
        updated = zendesk_client.update_ticket(ticket_id=int(ticket_id), **update_fields)
        return [types.TextContent(
            type="text",
            text=json.dumps({"message": "Ticket updated successfully", "ticket": updated}, indent=2)
        )]
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Update' implies a mutation, it doesn't specify permission requirements, whether changes are reversible, rate limits, or what happens to fields not mentioned. The description provides minimal behavioral context beyond the basic operation.

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

Conciseness5/5

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

The description is a single, efficient sentence that communicates the core purpose with helpful examples. Every word earns its place, and it's appropriately front-loaded with the essential information.

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

Completeness2/5

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

For a mutation tool with 10 parameters, 40% schema coverage, no annotations, and no output schema, the description is inadequate. It doesn't explain return values, error conditions, permission requirements, or provide sufficient parameter guidance given the complexity of the operation.

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 description mentions example fields (status, priority, assignee_id) which correspond to some of the 10 parameters, but with only 40% schema description coverage, it doesn't fully compensate for undocumented parameters like 'type', 'requester_id', or 'custom_fields'. It adds some value but leaves many parameters unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Update fields') and resource ('existing Zendesk ticket'), with specific examples of fields that can be updated. It distinguishes from 'create_ticket' by specifying it's for existing tickets, though it doesn't explicitly differentiate from other update-related tools.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'create_ticket' or 'get_ticket'. It mentions it's for existing tickets but doesn't specify prerequisites, error conditions, or when other tools might be more appropriate.

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

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