Skip to main content
Glama
effytech

Freshdesk MCP server

by effytech

update_contact_field

Modify specific fields for a contact in Freshdesk to maintain accurate and up-to-date customer information during support operations.

Instructions

Update a contact field in Freshdesk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contact_field_fieldsYes
contact_field_idYes

Implementation Reference

  • The handler function for the 'update_contact_field' tool. It is decorated with @mcp.tool() for registration and performs a PUT request to the Freshdesk API endpoint /contact_fields/{contact_field_id} to update the contact field with the provided fields.
    async def update_contact_field(contact_field_id: int, contact_field_fields: Dict[str, Any]) -> Dict[str, Any]:
        """Update a contact field in Freshdesk."""
        url = f"https://{FRESHDESK_DOMAIN}/api/v2/contact_fields/{contact_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=contact_field_fields)
            return response.json()
  • Pydantic BaseModel schema defining the input structure and validation for contact fields, used in the create_contact_field tool and relevant for understanding the expected fields in updates.
    class ContactFieldCreate(BaseModel):
        label: str = Field(..., description="Display name for the field (as seen by agents)")
        label_for_customers: str = Field(..., description="Display name for the field (as seen by customers)")
        type: str = Field(
            ...,
            description="Type of the field",
            pattern="^(custom_text|custom_paragraph|custom_checkbox|custom_number|custom_dropdown|custom_phone_number|custom_url|custom_date)$"
        )
        editable_in_signup: bool = Field(
            default=False,
            description="Set to true if the field can be updated by customers during signup"
        )
        position: int = Field(
            default=1,
            description="Position of the company field"
        )
        required_for_agents: bool = Field(
            default=False,
            description="Set to true if the field is mandatory for agents"
        )
        customers_can_edit: bool = Field(
            default=False,
            description="Set to true if the customer can edit the fields in the customer portal"
        )
        required_for_customers: bool = Field(
            default=False,
            description="Set to true if the field is mandatory in the customer portal"
        )
        displayed_for_customers: bool = Field(
            default=False,
            description="Set to true if the customers can see the field in the customer portal"
        )
        choices: Optional[List[Dict[str, Union[str, int]]]] = Field(
            default=None,
            description="Array of objects in format {'value': 'Choice text', 'position': 1} for dropdown choices"
        )
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Update' implies a mutation operation, but the description doesn't specify whether this requires specific permissions, what happens on failure, whether changes are reversible, or any rate limits. This leaves significant gaps for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (a mutation tool with 2 parameters, nested objects, and no output schema) and the complete lack of annotations and schema documentation, the description is inadequate. It doesn't explain what fields can be updated, the expected response, error conditions, or any behavioral context needed for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, meaning neither parameter has any documentation in the schema. The description adds no information about what 'contact_field_id' or 'contact_field_fields' represent, their expected formats, or examples of valid values. This fails to compensate for the complete lack of schema documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Update') and resource ('a contact field in Freshdesk'), providing a specific verb+resource combination. However, it doesn't differentiate this tool from sibling tools like 'update_contact' or 'update_ticket_field', which would require mentioning what makes contact fields distinct from other updateable entities.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., needing an existing contact field ID), when not to use it, or what distinguishes it from other update tools like 'update_contact' or 'update_ticket_field'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/effytech/freshdesk_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server