create_solution_article
Generate a solution article in Freshdesk by specifying a folder ID and article fields, streamlining support documentation creation and management.
Instructions
Create a solution article in Freshdesk.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| article_fields | Yes | ||
| folder_id | Yes |
Implementation Reference
- src/freshdesk_mcp/server.py:730-742 (handler)The main handler function for the 'create_solution_article' tool. It creates a solution article in Freshdesk by posting to the API endpoint with the provided folder_id and article_fields. Includes basic validation for required fields: title, status, description.@mcp.tool() async def create_solution_article(folder_id: int, article_fields: Dict[str, Any])-> Dict[str, Any]: """Create a solution article in Freshdesk.""" if not article_fields.get("title") or not article_fields.get("status") or not article_fields.get("description"): return {"error": "Title, status and description are required"} url = f"https://{FRESHDESK_DOMAIN}/api/v2/solutions/folders/{folder_id}/articles" headers = { "Authorization": f"Basic {base64.b64encode(f'{FRESHDESK_API_KEY}:X'.encode()).decode()}" } async with httpx.AsyncClient() as client: response = await client.post(url, headers=headers, json=article_fields) return response.json()
- src/freshdesk_mcp/server.py:730-730 (registration)The @mcp.tool() decorator registers the create_solution_article function as an MCP tool.@mcp.tool()