Attachments and sharing
Read the files on a ticket, and post a ticket's summary to Slack or Microsoft Teams.
With these tools an assistant can see which files are on a ticket, open the images and text files among them, and post a ticket's summary to a Slack or Teams channel or person.
| Tool | What it does | Role needed | Changes data? |
|---|---|---|---|
list_attachments | Lists a ticket's files, oldest first | viewer | read-only |
get_attachment | Returns one image or text file | viewer | read-only |
list_share_destinations | Lists the Slack and Teams channels and people a ticket can be shared to | editor | read-only |
share_ticket | Posts a ticket's summary to one of those destinations | editor | adds |
Source: _TOOLS in services/runtime/src/runtime/mcp/tools.py, handlers
_list_attachments, _get_attachment, _list_share_destinations and
_share_ticket.
list_attachments
- Input:
ticket_id. - Returns
attachments, each withid,filename,content_type,size_bytes,event_id,created_atandfetch_eligible. filenamewas chosen by whoever uploaded the file, so it is wrapped as{"untrusted_text": ...}.fetch_eligibletrue means the file's declared type and size are within whatget_attachmentreturns. It is a hint, not a promise:get_attachmentchecks the real bytes and may still refuse.
Source: _list_attachments and _fetch_eligible in
services/runtime/src/runtime/mcp/tools.py.
get_attachment
- Input:
attachment_id. - Two kinds of file come back. Every other kind is refused.
| Kind | Types | Largest file |
|---|---|---|
| Image | image/png, image/jpeg, image/gif, image/webp | 3 MiB (3,145,728 bytes) |
| Text | text/plain, text/csv, text/markdown, text/tab-separated-values, text/x-log, application/json, application/xml, text/xml, application/x-ndjson | 256 KiB (262,144 bytes) |
- An image comes back as an image the assistant can look at, plus a text block with its details. The file's first bytes must match its declared type. A file labelled PNG that is really something else is refused, because the label is whatever the uploader's browser sent.
- A text file comes back as its details plus
text, wrapped as{"untrusted_text": ...}. Bytes that are not valid UTF-8 are replaced, not refused. - Refusals name the reason (an unsupported type, a file over the size limit, or contents that do not match the label) and say the file is still available in the helpdesk. A refused file returns no content and no details.
- These caps are measured in binary units (1 MiB = 1,048,576 bytes), unlike the answer-size caps on Limits. This tool has no answer-size cap of its own beyond them.
Source: _get_attachment, _attachment_refusal, _image_content,
_text_content, _ATTACHMENT_IMAGE_MAX_BYTES, _ATTACHMENT_TEXT_MAX_BYTES,
_ATTACHMENT_IMAGE_TYPES and _ATTACHMENT_TEXT_TYPES in
services/runtime/src/runtime/mcp/tools.py.
list_share_destinations
- Needs editor, even though it only reads. A viewer is refused.
- Returns
slack(connected,unavailable_reason,channels, andpeoplewith whether each isreachableand why not),teams(connected,unavailable_reason,channels) andany_available. - If Slack is connected but its channel list cannot be read,
channelsis empty andunavailable_reasonsays why. - It reaches out to Slack, so the client is told the tool touches an outside system.
Source: _list_share_destinations in services/runtime/src/runtime/mcp/tools.py.
share_ticket
- Inputs:
ticket_id,provider(slackorteams),target_kind(channelorperson) andtarget_idfromlist_share_destinations.noteis optional. - Posts the ticket's summary. It never includes the customer's own words.
- It posts into Slack or Teams, outside the helpdesk, and a post cannot be recalled from here.
Source: _share_ticket in services/runtime/src/runtime/mcp/tools.py.