list_canned_responses
Retrieve all canned responses from Freshdesk for efficient ticket management. Specify folder_id to organize and access pre-written support replies.
Instructions
List all canned responses in Freshdesk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder_id | Yes |
Input Schema (JSON Schema)
{
"properties": {
"folder_id": {
"title": "Folder Id",
"type": "integer"
}
},
"required": [
"folder_id"
],
"title": "list_canned_responsesArguments",
"type": "object"
}
Implementation Reference
- src/freshdesk_mcp/server.py:524-536 (handler)The handler function for the 'list_canned_responses' tool. It fetches canned responses from a specified folder in Freshdesk using the API, decorated with @mcp.tool() for registration in the MCP server.@mcp.tool() async def list_canned_responses(folder_id: int)-> list[Dict[str, Any]]: """List all canned responses in Freshdesk.""" url = f"https://{FRESHDESK_DOMAIN}/api/v2/canned_response_folders/{folder_id}/responses" headers = { "Authorization": f"Basic {base64.b64encode(f'{FRESHDESK_API_KEY}:X'.encode()).decode()}" } canned_responses = [] async with httpx.AsyncClient() as client: response = await client.get(url, headers=headers) for canned_response in response.json(): canned_responses.append(canned_response) return canned_responses
- src/freshdesk_mcp/server.py:524-524 (registration)The @mcp.tool() decorator registers the list_canned_responses function as an MCP tool.@mcp.tool()