create_ticket_note
Add a note to a Freshdesk support ticket by specifying the ticket ID and note content to assist with ticket management and customer communication.
Instructions
Create a note for a ticket in Freshdesk.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| ticket_id | Yes |
Implementation Reference
- src/freshdesk_mcp/server.py:420-432 (handler)The handler function for the 'create_ticket_note' tool. It creates a private note on a Freshdesk ticket by making a POST request to the /tickets/{ticket_id}/notes API endpoint. The @mcp.tool() decorator registers this function as an MCP tool.@mcp.tool() async def create_ticket_note(ticket_id: int,body: str)-> Dict[str, Any]: """Create a note for a ticket in Freshdesk.""" url = f"https://{FRESHDESK_DOMAIN}/api/v2/tickets/{ticket_id}/notes" headers = { "Authorization": f"Basic {base64.b64encode(f'{FRESHDESK_API_KEY}:X'.encode()).decode()}" } data = { "body": body } async with httpx.AsyncClient() as client: response = await client.post(url, headers=headers, json=data) return response.json()
- src/freshdesk_mcp/server.py:420-420 (registration)The @mcp.tool() decorator registers the create_ticket_note function as a tool in the FastMCP server.@mcp.tool()