Custom fields, saved views and insights
Read and set custom ticket fields, open saved views, and read how the desk is performing.
With these tools an assistant can read and fill in the workspace's own ticket fields, open the same saved views your team uses in the inbox, and answer "how are we doing?" from the queue totals, the Insights figures and the SLA targets.
| Tool | What it does | Role needed | Changes data? |
|---|---|---|---|
list_ticket_fields | Lists the custom ticket fields, or one ticket's values | viewer | read-only |
set_ticket_fields | Sets custom field values on a ticket | editor | destructive |
list_saved_views | Lists your saved ticket views and the shared ones | viewer | read-only |
get_insights | Reads the Insights page's figures for a period | viewer | read-only |
get_ticket_stats | Queue counts by status, priority and source, SLA breaches and CSAT | viewer | read-only |
list_sla_policies | Lists the response and resolution targets in force | viewer | read-only |
Source: _TOOLS in services/runtime/src/runtime/mcp/tools.py, handlers
_list_ticket_fields, _set_ticket_fields, _list_saved_views,
_get_insights, _get_ticket_stats and _list_sla_policies.
get_ticket_stats and list_sla_policies send the client no read-only hint.
Both read and only read.
list_ticket_fields
- Without
ticket_id: the workspace's active field definitions. - With
ticket_id: that ticket's field values, undervalues. - If the answer is too big to send, whole entries are dropped from
values, largest first, and their keys are listed invalues_omitted.
Source: _list_ticket_fields and _FIELD_VALUE_MAPS in
services/runtime/src/runtime/mcp/tools.py.
set_ticket_fields
- Inputs:
ticket_idandvalues, a list of 1 to 50{definition_id, value}items. Take eachdefinition_idfromlist_ticket_fields. - Fields you do not list are left as they are. A
nullor emptyvalueclears that field. - Refusals: fields owned by an integration; an item with keys other than
definition_idandvalue; adefinition_idthat is not a UUID. - Returns the ticket's field values after the change, the same shape
list_ticket_fieldsgives for one ticket.
Source: _field_values and _set_ticket_fields in
services/runtime/src/runtime/mcp/tools.py.
list_saved_views, and opening one with list_tickets
list_saved_views returns views, at most 200. Each has id, name,
shared, filters, applicable and unsupported_filters.
To open a view, call list_tickets with view_id
set to the view's id:
- Only
limit,offsetandworkspace_idmay be sent withview_id. Any other filter alongside it is refused by name. - The view is applied whole or not at all. A view whose filters
list_ticketscannot apply (applicable: false) is refused, and the refusal names the filters.unsupported_filterstells you this in advance. - A view filter that holds several values where
list_ticketstakes one is refused, and the message says to open the view in the helpdesk.
Source: _list_saved_views, _saved_view_filters, _VIEW_APPLICABLE_FILTERS
and _VIEW_COMPANION_ARGS in services/runtime/src/runtime/mcp/tools.py.
get_insights
- Inputs, all optional:
rangeislast_24_hours,last_7_days,last_30_days(default) orlast_90_days;teamandcompanytake an id, ornonefor tickets with no team or no company;channel;tzis an IANA time zone.
- Returns
range,applied,filtersandsections: the Insights page's own figures, without the page's layout hints. - The answer is held to 128 KB. If it must be cut, the list of filter choices gives way before the figures do.
Source: _get_insights, _INSIGHTS_LAYOUT_KEYS and _INSIGHTS_ANSWER_LISTS
in services/runtime/src/runtime/mcp/tools.py.
get_ticket_stats
- Input:
csat_since_days, from 1 to 365, default 30. - Returns
total,by_status,by_priority,by_source,breach_countandcsat. - The counts come from the same queue route the inbox uses, so they match what the inbox shows.
This tool sits here rather than with the ticket tools because it describes the whole queue, not one ticket.
Source: _get_ticket_stats and _queue_totals in
services/runtime/src/runtime/mcp/tools.py.
list_sla_policies
No inputs beyond workspace_id. Returns the response and resolution targets in
force and what each applies to. An assistant should read this before telling a
customer when to expect an answer.
Source: _list_sla_policies in services/runtime/src/runtime/mcp/tools.py.