create_ticket
Every input property this tool accepts, with its bounds.
Open a new helpdesk ticket.
Role required: editor. This is the same check the HTTP route
POST /v1/tickets applies, run by the same guard object.
Source: tool definition services/runtime/src/runtime/mcp/tools.py:469-491,
handler services/runtime/src/runtime/mcp/tools.py:305-331, role check
services/runtime/src/runtime/mcp/tools.py:310-313, HTTP route
services/runtime/src/runtime/api/tickets.py:628-631.
Input
| Property | Type | Required | Notes |
|---|---|---|---|
subject | string | yes | |
workspace_id | string | no | The workspace to act in. Optional if you belong to exactly one workspace, required otherwise |
description | string | no | The opening message body |
priority | string | no | One of high, low, normal, urgent. Defaults to normal |
source | string | no | One of ai_handoff, api, email, manual, migrated, phone, sms, voicemail, web_widget, whatsapp. Defaults to api |
customer_id | string | no | Must be a UUID if given |
assignee_id | string | no | Must be a UUID if given |
team_id | string | no | Must be a UUID if given |
tags | array of string | no | Up to 50 tags, each 1 to 60 characters |
Source: services/runtime/src/runtime/mcp/tools.py:474-487 for the schema, with
the enum values built from
services/runtime/src/runtime/api/tickets.py:50 and
services/runtime/src/runtime/api/tickets.py:55-58, and the tag bounds at
services/runtime/src/runtime/api/tickets.py:42-43.
subject is required in two places: the schema declares it, and the handler
checks it before anything else runs, so an empty string is refused rather than
accepted as present.
Source: services/runtime/src/runtime/mcp/tools.py:306-307 and
services/runtime/src/runtime/mcp/tools.py:487.
Where the defaults come from
priority and source are not defaulted by the schema. The handler supplies
normal and api when the property is absent.
Source: services/runtime/src/runtime/mcp/tools.py:314-326.
Practical consequence: a client reading the tool schema will not see a default
value advertised for either. Omitting them still produces normal and api.
Output
The created ticket, as the HTTP route returns it, delivered as JSON text.
Failures
An unusable value comes back as a tool error carrying the reason. An identifier that is not a UUID, a priority or source outside the accepted set, a tag list that is too long: each is refused with a message the model can read and act on.
Source: services/runtime/src/runtime/mcp/tools.py:325-331.
Anything unanticipated returns exactly one message, this tool call could not be completed, with the real exception and its traceback written to the server logs
instead. That is deliberate, and it is why a caller never sees a database error.
Source: services/runtime/src/runtime/mcp/tools.py:566-574.