Files
freshservice-claude/mcp-server/server.py
spencerm 0b6747812f Handle custom ticket statuses: list_ticket_statuses tool + unresolved shortcut
The pesco instance defines 13 ticket statuses, not the 4 defaults, so a
(status:2 OR status:3) 'open tickets' filter silently dropped Working,
Scheduled, Waiting*, Pending Approval, etc. — undercounting 24 open tickets as 1.

Add a status helper that reads the status field from /ticket_form_fields and
treats only ids 4/5 (and closed/resolved-labelled) as terminal. Expose
list_ticket_statuses() and a list_tickets(unresolved=True) shortcut that builds
the full non-terminal status clause automatically. Document the gotcha in the
skill reference.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 21:36:25 -06:00

18 KiB