update_ticket_field
Modify ticket fields in Freshdesk using the specified ticket field ID and updated field values to streamline support ticket management and ensure accurate data.
Instructions
Update a ticket field in Freshdesk.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticket_field_fields | Yes | ||
| ticket_field_id | Yes |
Implementation Reference
- src/freshdesk_mcp/server.py:901-910 (handler)The handler function for the 'update_ticket_field' tool, decorated with @mcp.tool() for registration. It performs a PUT request to the Freshdesk admin API to update the specified ticket field.@mcp.tool() async def update_ticket_field(ticket_field_id: int, ticket_field_fields: Dict[str, Any]) -> Dict[str, Any]: """Update a ticket field in Freshdesk.""" url = f"https://{FRESHDESK_DOMAIN}/api/v2/admin/ticket_fields/{ticket_field_id}" headers = { "Authorization": f"Basic {base64.b64encode(f'{FRESHDESK_API_KEY}:X'.encode()).decode()}" } async with httpx.AsyncClient() as client: response = await client.put(url, headers=headers, json=ticket_field_fields) return response.json()
- src/freshdesk_mcp/server.py:901-901 (registration)The @mcp.tool() decorator registers the update_ticket_field function as an MCP tool.@mcp.tool()