MCPDocumentation
On this page

Incidents

Create an incident

create_incident
Direct write
Permission required
incidents:write / incidents:agent

When to use it

Opens an incident. With a personal key it is created as you (needs incidents.handle; assigning needs incidents.assign), like in the panel. With an agent key it is created as the organization's agent (needs incidents.create): the conversation or phone is required, the conversation's open one is reused, at most 10 per conversation and hour, and it returns spoken_reference and customer_message to read to the customer.

Input

FieldTypeDescription
organization_idintegerOnly to narrow: must be your organization (Autonex staff may pick another)
titleRequiredstringWhat happened, in one line
descriptionstringDetail
priority"urgent" | "high" | "medium" | "low"
conversation_idintegerConversation to link (the customer's)
pause_agentbooleantrue = the conversation goes to a person while the incident is open
category_idintegerPeople: category id (incident_options)
location_idintegerPeople: centre
department_idintegerPeople: department
assignee_user_idintegerPeople: who owns it (needs incidents.assign)
due_atstringPeople: due date, YYYY-MM-DD or ISO date-time
contact_idintegerPeople: contact
force_newbooleanPeople: create even if the conversation already has an open one
contact_phonestringAgents: customer phone (E.164) when there is no conversation
contact_namestringAgents: customer name
livekit_roomstringAgents: LiveKit room of the call (instead of conversation_id)
categorystringAgents: category name, if clear
language"es" | "ca" | "en"Agents: customer language for customer_message

Every tool also accepts lang (es | en) for the language of the text answer.

Output

FieldTypeDescription
incident_idRequirednumber
identifierRequiredstring | null
titleRequiredstring
statusRequiredstring
reusedRequiredbooleanAgents: the conversation already had an open one, which was reused
spoken_referenceRequiredstring | nullAgents: reference to say aloud
customer_messageRequiredstring | nullAgents: sentence ready to tell the customer
incidentRequiredobject | nullPeople: the created incident

Examples

Example 1: A person opens an urgent incident

Call

JSON
{
  "name": "create_incident",
  "arguments": {
    "title": "La máquina de la sala 2 no funciona",
    "priority": "urgent",
    "location_id": 5
  }
}

Example 2: The voice agent opens an incident during a call

Call

JSON
{
  "name": "create_incident",
  "arguments": {
    "title": "Quiere cambiar la cita del jueves",
    "livekit_room": "room-abc123",
    "contact_phone": "+34600111222",
    "category": "Citas",
    "language": "es"
  }
}

Response

JSON
{
  "incident_id": 812,
  "identifier": "HEM-142",
  "title": "Quiere cambiar la cita del jueves",
  "status": "pending",
  "reused": false,
  "spoken_reference": "la incidencia ciento cuarenta y dos",
  "customer_message": "He abierto la incidencia 142. El equipo la revisará y te contestará lo antes posible.",
  "incident": null
}

Equivalent JSON-RPC call (POST /mcp)

JSON
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_incident",
    "arguments": {
      "title": "La máquina de la sala 2 no funciona",
      "priority": "urgent",
      "location_id": 5
    }
  }
}