Skip to main content
Glama
effytech

Freshdesk MCP server

by effytech

search_companies

Locate companies in Freshdesk to streamline customer support operations. Use this tool to search and retrieve company data, enabling efficient ticket management and support interactions.

Instructions

Search for companies in Freshdesk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Implementation Reference

  • The core handler function for the 'search_companies' tool. It performs an autocomplete search on the Freshdesk companies API using the provided query as the 'name' parameter and returns the JSON response or an error.
    @mcp.tool()
    async def search_companies(query: str) -> Dict[str, Any]:
        """Search for companies in Freshdesk."""
        url = f"https://{FRESHDESK_DOMAIN}/api/v2/companies/autocomplete"
        headers = {
            "Authorization": f"Basic {base64.b64encode(f'{FRESHDESK_API_KEY}:X'.encode()).decode()}",
            "Content-Type": "application/json"
        }
        # Use the name parameter as specified in the API
        params = {"name": query}
    
        async with httpx.AsyncClient() as client:
            try:
                response = await client.get(url, headers=headers, params=params)
                response.raise_for_status()
                return response.json()
            except httpx.HTTPStatusError as e:
                return {"error": f"Failed to search companies: {str(e)}"}
            except Exception as e:
                return {"error": f"An unexpected error occurred: {str(e)}"}
Behavior1/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. It only states the action ('Search') without any details on permissions, rate limits, return format, pagination, or error handling. This is inadequate for a tool with no annotation coverage, failing to inform the agent about how the tool behaves.

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, straightforward sentence with no wasted words, making it highly concise. It is front-loaded with the core action, though this brevity contributes to gaps in other dimensions, but as per the criteria, it earns full marks for conciseness.

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

Completeness1/5

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

Given the complexity of a search tool with no annotations, 0% schema description coverage, and no output schema, the description is severely incomplete. It fails to explain behavioral traits, parameter meanings, or return values, making it inadequate for the agent to use the tool effectively.

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

Parameters1/5

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

The input schema has 1 parameter with 0% description coverage, and the tool description adds no information about the 'query' parameter's semantics, such as what it searches (e.g., names, IDs, fields) or its format. With low schema coverage and no compensation in the description, this leaves the parameter undocumented.

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

Purpose3/5

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

The description states the verb ('Search') and resource ('companies in Freshdesk'), providing a basic purpose. However, it lacks specificity about what aspects of companies are searched or how the search works, and it doesn't distinguish from sibling tools like 'find_company_by_name' or 'list_companies', making it vague rather than clear.

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 on when to use this tool versus alternatives such as 'find_company_by_name' or 'list_companies'. The description implies a search context but offers no explicit usage instructions, exclusions, or prerequisites, leaving the agent to infer without support.

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