get_field_properties
Retrieve detailed properties of a specific field by name using Freshdesk MCP server to streamline support ticket management and integration with AI models.
Instructions
Get properties of a specific field by name.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| field_name | Yes |
Implementation Reference
- src/freshdesk_mcp/server.py:986-1004 (handler)The @mcp.tool()-decorated function that implements and registers the 'get_field_properties' tool. It retrieves all ticket fields from the Freshdesk API and returns the properties of the field matching the provided name (special handling for 'type' mapped to 'ticket_type').@mcp.tool() async def get_field_properties(field_name: str): """Get properties of a specific field by name.""" url = f"https://{FRESHDESK_DOMAIN}/api/v2/ticket_fields" headers = { "Authorization": f"Basic {base64.b64encode(f'{FRESHDESK_API_KEY}:X'.encode()).decode()}" } actual_field_name=field_name if field_name == "type": actual_field_name="ticket_type" async with httpx.AsyncClient() as client: response = await client.get(url, headers=headers) response.raise_for_status() # Raise error for bad status codes fields = response.json() # Filter the field by name matched_field = next((field for field in fields if field["name"] == actual_field_name), None) return matched_field