Skip to main content
Glama
effytech

Freshdesk MCP server

by effytech

list_contact_fields

Retrieve all contact fields in Freshdesk using this tool. Access structured contact field data to automate support operations and enhance ticket management workflows with AI integration.

Instructions

List all contact fields in Freshdesk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function decorated with @mcp.tool() registers and implements the list_contact_fields tool, fetching contact fields from Freshdesk API.
    @mcp.tool()
    async def list_contact_fields()-> list[Dict[str, Any]]:
        """List all contact fields in Freshdesk."""
        url = f"https://{FRESHDESK_DOMAIN}/api/v2/contact_fields"
        headers = {
            "Authorization": f"Basic {base64.b64encode(f'{FRESHDESK_API_KEY}:X'.encode()).decode()}"
        }
        async with httpx.AsyncClient() as client:
            response = await client.get(url, headers=headers)
            return response.json()
  • Pydantic model defining the schema/structure for contact fields, relevant to the fields returned by list_contact_fields.
    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 full burden. It states 'List all' but doesn't disclose behavioral traits like pagination, rate limits, authentication needs, or what 'all' entails (e.g., scope, filters). This is inadequate for a 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 that front-loads the core purpose ('List all contact fields in Freshdesk') with zero wasted words. It's appropriately sized for a simple tool with no parameters.

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 tool's simplicity (0 parameters, no output schema), the description is minimal but incomplete. Without annotations, it lacks behavioral context (e.g., read-only nature, potential limitations), and with sibling tools present, it doesn't address differentiation, making it insufficient for full understanding.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage, so no parameter documentation is needed. The description doesn't add parameter semantics, but this is acceptable given the baseline of 4 for zero parameters, as it doesn't mislead or omit required info.

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 ('List all') and resource ('contact fields in Freshdesk'), making the purpose immediately understandable. However, it doesn't differentiate from similar sibling tools like 'list_company_fields' or 'get_ticket_fields', which would require explicit distinction for a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'list_contacts', 'get_contact', and 'list_company_fields', there's no indication of context, prerequisites, or exclusions, leaving usage ambiguous.

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