Skip to main content
Glama
effytech

Freshdesk MCP server

by effytech

create_canned_response

Automate support ticket responses by creating pre-defined canned messages in Freshdesk, streamlining customer service workflows and improving efficiency.

Instructions

Create a canned response in Freshdesk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
canned_response_fieldsYes

Implementation Reference

  • The main handler function for the 'create_canned_response' tool. It validates input using CannedResponseCreate model, makes a POST request to Freshdesk API to create the canned response, and returns the response.
    @mcp.tool()
    async def create_canned_response(canned_response_fields: Dict[str, Any])-> Dict[str, Any]:
        """Create a canned response in Freshdesk."""
        # Validate input using Pydantic model
        try:
            validated_fields = CannedResponseCreate(**canned_response_fields)
            # Convert to dict for API request
            canned_response_data = validated_fields.model_dump(exclude_none=True)
        except Exception as e:
            return {"error": f"Validation error: {str(e)}"}
    
        url = f"https://{FRESHDESK_DOMAIN}/api/v2/canned_responses"
        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=canned_response_data)
            return response.json()
  • Pydantic model defining the input schema for creating a canned response, used for validation in the handler.
    class CannedResponseCreate(BaseModel):
        title: str = Field(..., description="Title of the canned response")
        content_html: str = Field(..., description="HTML version of the canned response content")
        folder_id: int = Field(..., description="Folder where the canned response gets added")
        visibility: int = Field(
            ...,
            description="Visibility of the canned response (0=all agents, 1=personal, 2=select groups)",
            ge=0,
            le=2
        )
        group_ids: Optional[List[int]] = Field(
            None,
            description="Groups for which the canned response is visible. Required if visibility=2"
        )
  • The @mcp.tool() decorator registers the create_canned_response function as an MCP tool with the name 'create_canned_response'.
    @mcp.tool()
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. 'Create' implies a write/mutation operation, but the description doesn't mention required permissions, whether this operation is idempotent, what happens on failure, or what the response contains. For a creation tool with zero annotation coverage, this leaves significant behavioral questions unanswered.

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 extremely concise - a single sentence that gets straight to the point without any unnecessary words. It's front-loaded with the essential information (create operation, canned response resource, Freshdesk context) and contains zero fluff or redundant information.

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?

For a creation tool with no annotations, 0% schema coverage, no output schema, and a nested object parameter, the description is insufficient. It doesn't explain what a canned response is, what fields are required to create one, what permissions are needed, what the response looks like, or how this differs from related operations. The context signals indicate significant complexity that the description doesn't address.

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?

With 0% schema description coverage and a single parameter ('canned_response_fields') that's an object type, the description provides no information about what fields are needed to create a canned response. The description doesn't mention any required or optional fields, format expectations, or examples of what should be included in the parameter object, leaving the parameter completely undocumented.

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 ('Create') and resource ('a canned response in Freshdesk'), making the purpose immediately understandable. It distinguishes this tool from other creation tools (like create_agent, create_ticket) by specifying the resource type. However, it doesn't explain what a 'canned response' is or how it differs from similar resources like 'canned response folders'.

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 'create_canned_response_folder', 'create_ticket_reply', and 'update_canned_response', there's no indication of when this specific creation tool is appropriate versus those other options. The description lacks any context about prerequisites, timing, or relationship to other operations.

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