Skip to content

Agent Tools

The Freshdesk agent provides 6 tools for searching and analyzing support tickets:

ToolDescriptionKey Parameters
search_ticketsNatural-language search across Freshdesk tickets.query, limit
list_recent_ticketsList tickets created in the last N days, with detailed views auto-fetched for the most recent tickets.days
get_ticket_detailsRetrieve full ticket context including description, status, priority, and a generated summary of conversations.ticket_id, include_conversations
get_ticket_conversationsRetrieve all conversations for a ticket, labeled as Customer Reply, Agent Reply, or Internal Note.ticket_id
search_tickets_advancedStructured search with status/priority/company/agent/tag filters plus a raw custom_query for custom fields.status, priority, company, agent, tags, created_after, custom_query, limit, sort_by, sort_order
get_tickets_by_companyList a company’s tickets with a priority breakdown, sorted by priority.company_name, days

Freshdesk uses numeric codes for status and priority. The agent accepts either the code or the human-readable name and translates it into a search query:

StatusCode
Open2
Pending3
Resolved4
Closed5
Waiting on Customer6
PriorityCode
Low1
Medium2
High3
Urgent4

search_tickets_advanced builds a Freshdesk search query from its structured parameters:

FilterQuery SyntaxNotes
Statusstatus:{code}e.g., status:4
Prioritypriority:{code}e.g., priority:3
Companycf_portal_name_ak:'{name}'Matches the company/portal custom field
Agentresponder_name:'{name}'Matches the assigned responder
Tagstag:'{tag}'One clause per tag
Created Aftercreated_at:>'{YYYY-MM-DD}'Date-based filter
Customcustom_queryRaw Freshdesk search syntax, combined with the structured filters

The default query when no filters are provided is status:2 (Open).

When the connector initializes, it loads your Freshdesk ticket fields and injects the custom-field schema into the agent’s system prompt. This lets the agent build correct custom_query filters for fields like cf_tenantid, cf_service_impact_ak, cf_portal_name_ak, and nested category fields.

  • Nested fields must be queried using the subcategory value (not the parent)
  • Unindexed fields (e.g., cf_resolution_summary, cf_category, cf_sub_category, cf_root_cause) are not searchable by name — the agent is instructed to use custom_string instead
  • If a custom-field query returns 0 results, the agent retries up to 2 additional attempts with a schema-correction prompt

When listing or searching tickets, the agent automatically fetches full details for a subset of the results so the answer includes rich context, not just ticket summaries.

SettingDefaultDescription
freshdesk_auto_fetch_count3Tickets to fetch details for in an initial sweep

For search_tickets_advanced, details are fetched for the top tickets by priority when the result limit is within freshdesk_auto_fetch_count.

Prefix your query with /freshdesk to route directly to the Freshdesk agent, bypassing the workflow classification:

/freshdesk What support tickets are open about the VPN connector?

Every ticket found during a session is tracked and appended to the response as a Sources section of clickable ticket URLs (sorted numerically, deduplicated):

Sources:
- https://company.freshdesk.com/a/tickets/50123
- https://company.freshdesk.com/a/tickets/50145

After the agent finishes, a FreshdeskResponseValidator checks every ticket ID cited in the response against the IDs actually retrieved by the tools:

  • Unverified ticket IDs referenced in the response are stripped out automatically
  • A warning is logged whenever the response is corrected
  • If no tickets were found or the response contains no valid ticket references, the agent reports an insufficient result rather than guessing
SettingDefaultDescription
freshdesk_auto_fetch_count31–50, hot-reload
timeout_freshdesk_agent30sConfig default agent timeout
connector timeout45sAgent execution timeout

All endpoints require admin authentication.

EndpointMethodDescription
/api/connectors/freshdeskGETGet Freshdesk connector status and configuration
/api/connectors/freshdeskPATCHEnable/disable the Freshdesk connector (hot-reload)
/api/connectors/freshdesk/live-queryPATCHEnable/disable the live-search agent
/api/connectors/freshdesk/test-connectionPOSTTest Freshdesk connectivity and credentials