Skip to main content
Glama

zendesk_assign_ticket

Assign a Zendesk ticket to an agent by email address. Use 'me' to assign to the authenticated user.

Instructions

Assign a Zendesk ticket to an agent by their email address. Pass 'me' as assignee_email to assign the ticket to yourself (the authenticated user).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ticket_idYes
assignee_emailYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The tool 'zendesk_assign_ticket' is registered as an MCP tool via the @mcp.tool() decorator inside register_update_ticket_tools().
    @mcp.tool()
    def zendesk_assign_ticket(ticket_id: int, assignee_email: str) -> str:
        """Assign a Zendesk ticket to an agent by their email address. Pass 'me' as assignee_email to assign the ticket to yourself (the authenticated user)."""
        return _assign_ticket_data(ticket_id, assignee_email)
  • The actual handler function '_assign_ticket_data' that executes the assignment logic: looks up the user by email (or 'me'), sets ticket.assignee_id, and calls client.tickets.update().
    def _assign_ticket_data(ticket_id: int, assignee_email: str) -> str:
        try:
            client = get_client()
            if assignee_email.lower() == "me":
                user = client.users.me()
            else:
                search_results = list(client.search(query=f"type:user email:{assignee_email}"))
                if not search_results:
                    return f"User not found: no Zendesk user with email: {assignee_email}"
                user = search_results[0]
            ticket = Ticket(id=ticket_id)
            ticket.assignee_id = user.id
            client.tickets.update(ticket)
            return f"Ticket #{ticket_id} assigned to {user.name} ({user.email})."
        except ConfigError as e:
            return str(e)
        except Exception as e:
            if "RecordNotFound" in str(e) or "404" in str(e):
                return f"Ticket #{ticket_id} not found or not accessible with current credentials."
            return f"Zendesk API error: {e}"
  • The import and call to register_update_ticket_tools in the server's main() function that wires up the tool registration.
    from zendesk_mcp.tools.update_ticket import register_update_ticket_tools
    from zendesk_mcp.tools.time_tracking import register_time_tracking_tools
    from zendesk_mcp.tools.git_zen import register_git_zen_tools
    
    register_ticket_tools(mcp)
    register_comments_tools(mcp)
    register_attachment_tools(mcp)
    register_gitlab_context_tools(mcp)
    register_write_comment_tools(mcp)
    register_update_ticket_tools(mcp)
  • The get_client() helper used by the handler to create a Zenpy client.
    def get_client(config_file: Path | None = None) -> Zenpy:
        cfg = load_config(config_file)
        subdomain = cfg.get("subdomain", "").strip()
        token = cfg.get("oauth_token", "").strip()
        if not subdomain or not token:
            raise ConfigError("Zendesk not configured. Run: zendesk-mcp setup")
        return Zenpy(subdomain=subdomain, oauth_token=token)
  • The function signature defines the schema: ticket_id (int) and assignee_email (str) as required parameters.
    def zendesk_assign_ticket(ticket_id: int, assignee_email: str) -> str:
Behavior2/5

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

Without annotations, the description carries the full burden of behavioral disclosure. It states the action is an assignment but fails to describe side effects (e.g., does it overwrite existing assignee?), permissions required, rate limits, or confirmation of success. The 'me' self-assignment detail is helpful but insufficient.

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?

Two sentences convey the essential information without any wasted words. The structure is front-loaded with the main action, followed by a specific usage hint.

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

Completeness4/5

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

Given the tool's simplicity (2 parameters, no enums) and the existence of an output schema, the description covers the core functionality adequately. It could mention what the response indicates or potential errors, but it is largely complete for its complexity.

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 0%, so the description must compensate. It clarifies that assignee_email is an email address and can be the special value 'me' for self-assignment. For ticket_id, no additional meaning is provided beyond its name. This partial but valuable info earns a 3.

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?

The description clearly states the tool assigns a Zendesk ticket to an agent by email. It uses a specific verb ('assign') and resource ('ticket'), and distinguishes itself from sibling tools like zendesk_set_ticket_status or zendesk_post_comment.

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

Usage Guidelines4/5

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

The description provides clear usage guidance, including how to self-assign using 'me' as the assignee_email. However, it does not explicitly mention when not to use this tool or offer alternatives among sibling tools.

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

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