Skip to content

MCP (Model Context Protocol)

The Kayse AI MCP server enables AI assistants to interact with your Kayse AI data through the Model Context Protocol.

Overview

MCP allows AI assistants (like Claude Desktop, Cline, Cursor, and others) to:

  • Read and update operational data across cases, clients, case lists, forms, campaigns, calls, tasks, and notes
  • Review company configuration data such as case types, case statuses, webhooks, admins, and audit logs
  • Trigger selected workflow actions such as sending case SMS/email messages, testing webhooks, replaying webhook deliveries, and reordering case statuses
  • Search and filter your data using natural language in any MCP-compatible client

Authentication

MCP uses Bearer token authentication with the same API keys as the Kayse AI Public API. Include your API key as a Bearer token in the Authorization header:

Authorization: Bearer YOUR_API_KEY

See Authentication for details on generating and managing API keys.

Endpoint

POST https://public-api.kayse.ai/v1/mcp

All MCP operations use this single endpoint. The specific tool to invoke is specified in the JSON-RPC request body.

How Calls Work

MCP uses JSON-RPC over a single HTTP endpoint.

  • Use tools/list to discover the current tool catalog
  • Use tools/call with a tool name and arguments object to execute a tool

Discover Tools

Call tools/list to get the full schema for every available tool, including argument names, types, and descriptions.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list"
}

Call a Tool

Call tools/call with the tool name and an arguments object. The response contains the tool result as a JSON text block.

Request
json
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "list_cases",
    "arguments": {
      "page": 1,
      "per_page": 25
    }
  }
}

Pagination

List tools that support pagination accept page (1-based, defaults to 1) and per_page (defaults to 25) arguments. Paginated responses include:

FieldTypeDescription
current_pageIntegerThe current page number
total_pagesIntegerTotal number of pages
total_recordsIntegerTotal number of records matching the query

These fields are returned alongside the resource array (e.g. cases, clients).

INFO

list_audit_logs uses a slightly different pagination envelope with total, page, and page_size fields.

Some list tools are not paginated and return a single object with an items array (for example list_webhooks, list_webhook_logs, list_case_type_custom_fields, and list_hierarchical_case_statuses). Read the result list from the items field.


Cases

list_cases

List cases for the company. Supports pagination and keyword search.

Arguments

FieldRequiredTypeDescription
pagefalseIntegerPage number (1-based). Defaults to 1
per_pagefalseIntegerItems per page. Defaults to 25
keyfalseStringSearch keyword to filter cases by name or case number

Response Fields

FieldTypeDescription
idIntegerCase ID
nameStringCase name
case_numberStringExternal case number
descriptionStringCase description
typeStringCase type name
statusStringCase status name
court_nameStringCourt name
jurisdictionStringJurisdiction
representativeStringRepresentative
external_sourceStringExternal source identifier
external_source_idStringExternal source record ID
is_oboBooleanWhether the case is on behalf of
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_cases",
    "arguments": {
      "page": 1,
      "per_page": 10,
      "key": "smith"
    }
  }
}
Response
json
{
  "current_page": 1,
  "total_pages": 3,
  "total_records": 28,
  "cases": [
    {
      "id": 42,
      "name": "Smith v. Johnson",
      "case_number": "CV-2025-001",
      "type": "Personal Injury",
      "status": "Active",
      "is_obo": false
    }
  ]
}

get_case

Get a single case by ID.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe case ID

Returns the same fields as list_cases for a single case.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_case",
    "arguments": { "id": 42 }
  }
}

create_case

Create a new case. Type and status are created automatically if they don't exist.

Arguments

FieldRequiredTypeDescription
typetrueStringCase type name. Created if it does not exist
statustrueStringCase status name. Created if it does not exist
namefalseStringCase name. Auto-generated if omitted
case_numberfalseStringExternal case number
descriptionfalseStringCase description
court_namefalseStringCourt name
jurisdictionfalseStringJurisdiction
representativefalseStringRepresentative
external_sourcefalseStringExternal source identifier
external_source_idfalseStringExternal source record ID

Returns the created case object.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_case",
    "arguments": {
      "name": "Smith v. Johnson",
      "type": "Personal Injury",
      "status": "New",
      "case_number": "CV-2025-001"
    }
  }
}

update_case

Update an existing case. Only provided fields are updated.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe case ID to update
namefalseStringNew case name
case_numberfalseStringNew case number
typefalseStringCase type name
statusfalseStringCase status name
descriptionfalseStringNew description
court_namefalseStringNew court name
jurisdictionfalseStringNew jurisdiction
representativefalseStringNew representative
external_sourcefalseStringExternal source identifier
external_source_idfalseStringExternal source record ID

Returns the updated case object.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_case",
    "arguments": {
      "id": 42,
      "status": "In Review"
    }
  }
}

send_sms_to_case

Send an SMS message to all clients linked to a case.

Arguments

FieldRequiredTypeDescription
case_idtrueIntegerThe case ID to send SMS to
messagetrueStringThe SMS message body
send_chat_messagefalseBooleanAlso record as a chat message. Defaults to false

Response

json
{ "status": "sms scheduled" }
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "send_sms_to_case",
    "arguments": {
      "case_id": 42,
      "message": "Your case has been updated."
    }
  }
}

send_email_to_case

Send an email to all clients linked to a case.

Arguments

FieldRequiredTypeDescription
case_idtrueIntegerThe case ID to send email to
subjecttrueStringThe email subject
messagetrueStringThe email body
send_chat_messagefalseBooleanAlso record as a chat message. Defaults to false

Response

json
{ "status": "email scheduled" }
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "send_email_to_case",
    "arguments": {
      "case_id": 42,
      "subject": "Case Update",
      "message": "Your case status has been changed to In Review."
    }
  }
}

Contacts

list_clients

List clients for the company. Supports pagination and keyword search.

Arguments

FieldRequiredTypeDescription
pagefalseIntegerPage number (1-based). Defaults to 1
per_pagefalseIntegerItems per page. Defaults to 25
keyfalseStringSearch keyword to filter clients by name or email

Response Fields

FieldTypeDescription
idIntegerClient ID
first_nameStringClient first name
last_nameStringClient last name
emailStringEmail address
mobileStringMobile phone number
genderStringGender
cityStringCity name
stateStringState code
postal_codeStringPostal/ZIP code
address_line1StringPrimary address line
address_line2StringSecondary address line
external_sourceStringExternal source identifier
external_source_idStringExternal source record ID
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_clients",
    "arguments": {
      "page": 1,
      "per_page": 10,
      "key": "doe"
    }
  }
}
Response
json
{
  "current_page": 1,
  "total_pages": 1,
  "total_records": 2,
  "clients": [
    {
      "id": 101,
      "first_name": "John",
      "last_name": "Doe",
      "email": "john.doe@example.com",
      "mobile": "+1234567890",
      "city": "New York",
      "state": "NY"
    }
  ]
}

get_client

Get a single client by ID.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe client ID

Returns the same fields as list_clients for a single client.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_client",
    "arguments": { "id": 101 }
  }
}

create_client

Create a new client.

Arguments

FieldRequiredTypeDescription
first_nametrueStringClient first name
last_nametrueStringClient last name
emailfalseStringEmail address
mobilefalseStringMobile phone number
genderfalseStringGender
cityfalseStringCity name. Must be paired with state
statefalseStringState code. Must be paired with city
postal_codefalseStringPostal/ZIP code
address_line1falseStringPrimary address line
address_line2falseStringSecondary address line
external_sourcefalseStringExternal source identifier
external_source_idfalseStringExternal source record ID

Returns the created client object.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_client",
    "arguments": {
      "first_name": "Jane",
      "last_name": "Doe",
      "email": "jane.doe@example.com",
      "city": "Los Angeles",
      "state": "CA"
    }
  }
}

update_client

Update an existing client. Only provided fields are updated.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe client ID to update
first_namefalseStringNew first name
last_namefalseStringNew last name
emailfalseStringNew email address
mobilefalseStringNew mobile phone number
genderfalseStringNew gender
cityfalseStringCity name. Must be paired with state
statefalseStringState code. Must be paired with city
postal_codefalseStringNew postal/ZIP code
address_line1falseStringNew primary address line
address_line2falseStringNew secondary address line
external_sourcefalseStringNew external source identifier
external_source_idfalseStringNew external source record ID

Returns the updated client object.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_client",
    "arguments": {
      "id": 101,
      "email": "jane.updated@example.com"
    }
  }
}

Case Lists

list_case_lists

List case lists for the company. Supports pagination and search.

Arguments

FieldRequiredTypeDescription
pagefalseIntegerPage number (1-based). Defaults to 1
per_pagefalseIntegerItems per page. Defaults to 25
keyfalseStringSearch keyword to filter case lists by name
case_type_idfalseIntegerFilter by case type ID
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_case_lists",
    "arguments": { "per_page": 10 }
  }
}

get_case_list

Get a single case list by ID.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe case list ID
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_case_list",
    "arguments": { "id": 5 }
  }
}

create_case_list

Create a new case list.

Arguments

FieldRequiredTypeDescription
nametrueStringName of the case list
descriptionfalseStringDescription of the case list
case_type_idfalseIntegerRestrict to a specific case type ID

Returns the created case list object.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_case_list",
    "arguments": {
      "name": "Active PI Cases",
      "description": "All active personal injury cases"
    }
  }
}

update_case_list

Update an existing case list.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe case list ID to update
namefalseStringNew name
descriptionfalseStringNew description
case_type_idfalseIntegerNew case type ID

Returns the updated case list object.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_case_list",
    "arguments": {
      "id": 5,
      "name": "Active PI Cases - Q2"
    }
  }
}

Forms

list_forms

List forms for the company. Supports pagination and keyword search.

Arguments

FieldRequiredTypeDescription
pagefalseIntegerPage number (1-based). Defaults to 1
per_pagefalseIntegerItems per page. Defaults to 25
keyfalseStringSearch keyword to filter forms by name

Response Fields

FieldTypeDescription
idIntegerForm ID
nameStringForm name
descriptionStringForm description
due_inIntegerDue-in period (days)
case_type_idIntegerAssociated case type ID
versionIntegerForm version number
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_forms",
    "arguments": { "key": "intake" }
  }
}

get_form

Get a single form by ID.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe form ID

Returns the same fields as list_forms for a single form.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_form",
    "arguments": { "id": 8 }
  }
}

Campaigns

list_campaigns

List campaigns for the company. Supports pagination and keyword search.

Arguments

FieldRequiredTypeDescription
pagefalseIntegerPage number (1-based). Defaults to 1
per_pagefalseIntegerItems per page. Defaults to 25
keyfalseStringSearch keyword to filter campaigns by name

Response Fields

FieldTypeDescription
idIntegerCampaign ID
nameStringCampaign name
statusStringCampaign status
case_list_idIntegerAssociated case list ID
case_list_nameStringAssociated case list name
is_oboBooleanWhether the campaign is on behalf of
never_endingBooleanWhether the campaign is recurring
is_publicBooleanWhether the campaign is public
run_countIntegerNumber of campaign runs
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_campaigns",
    "arguments": { "per_page": 5 }
  }
}
Response
json
{
  "current_page": 1,
  "total_pages": 2,
  "total_records": 8,
  "campaigns": [
    {
      "id": 15,
      "name": "Q2 Follow-up",
      "status": "active",
      "case_list_id": 5,
      "case_list_name": "Active PI Cases",
      "is_obo": false,
      "never_ending": false,
      "is_public": true,
      "run_count": 3
    }
  ]
}

get_campaign

Get a single campaign by ID.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe campaign ID

Returns the same fields as list_campaigns for a single campaign.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_campaign",
    "arguments": { "id": 15 }
  }
}

Calls

list_calls

List calls for the company. Supports pagination, keyword search, and filtering by campaign or case.

Arguments

FieldRequiredTypeDescription
pagefalseIntegerPage number (1-based). Defaults to 1
per_pagefalseIntegerItems per page. Defaults to 25
campaign_idfalseIntegerFilter by campaign ID
case_idfalseIntegerFilter by case ID
keyfalseStringSearch keyword to filter calls

Response Fields (list)

FieldTypeDescription
idIntegerCall ID
start_timeStringCall start time (ISO 8601)
durationStringCall duration
sentiment_scoreNumberSentiment score
client_nameStringClient name
resultStringCall result
campaign_nameStringCampaign name
campaign_idIntegerCampaign ID
case_nameStringCase name
case_idStringCase ID
opted_outBooleanWhether client opted out
is_disqualifiedBooleanWhether client was disqualified
disconnection_reasonStringDisconnection reason
end_reasonStringEnd reason
directionStringCall direction
agent_nameStringVoice agent name
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_calls",
    "arguments": {
      "campaign_id": 15,
      "per_page": 10
    }
  }
}

get_call

Get a single call by ID with transcript and summary details.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe call ID

Additional Response Fields (detail)

The detail response includes all list fields plus:

FieldTypeDescription
client_idIntegerClient ID
client_phoneStringClient phone number
summaryStringAI-generated call summary
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_call",
    "arguments": { "id": 200 }
  }
}

Tasks

list_tasks

List reusable task definitions for the company. Supports pagination and search.

Arguments

FieldRequiredTypeDescription
pagefalseIntegerPage number (1-based). Defaults to 1
per_pagefalseIntegerItems per page. Defaults to 25
keyfalseStringSearch keyword to filter tasks by title

Response Fields

FieldTypeDescription
idIntegerTask ID
titleStringTask title
bodyStringTask body/description
response_typeStringResponse type
todo_countIntegerNumber of pending instances
completed_countIntegerNumber of completed instances
overdue_countIntegerNumber of overdue instances
skipped_countIntegerNumber of skipped instances
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_tasks",
    "arguments": { "key": "follow" }
  }
}

get_task

Get a single task by ID with its case task instances.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe task ID

Response Fields

FieldTypeDescription
idIntegerTask ID
titleStringTask title
bodyStringTask body/description
response_typeStringResponse type
case_tasksArrayCase task instances
case_tasks[].idIntegerCase task ID
case_tasks[].case_idIntegerAssociated case ID
case_tasks[].statusStringCase task status
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_task",
    "arguments": { "id": 10 }
  }
}
Response
json
{
  "id": 10,
  "title": "Follow-up Call",
  "body": "Complete follow-up call with client",
  "response_type": "boolean",
  "case_tasks": [
    { "id": 50, "case_id": 42, "status": "completed" },
    { "id": 51, "case_id": 43, "status": "todo" }
  ]
}

Notes

list_notes

List notes for a case or client. Either case_id or client_id is required.

Arguments

FieldRequiredTypeDescription
pagefalseIntegerPage number (1-based). Defaults to 1
per_pagefalseIntegerItems per page. Defaults to 25
case_idconditionalIntegerFilter notes by case ID
client_idconditionalIntegerFilter notes by client ID
searchfalseStringSearch keyword to filter notes

WARNING

Either case_id or client_id must be provided.

Response Fields

FieldTypeDescription
idIntegerNote ID
ulidStringNote ULID
titleStringNote title
bodyStringNote body
typeStringNote type (case or client)
reference_idIntegerAssociated case or client ID
case_nameStringCase name (if type is case)
author_nameStringNote author name
created_atStringCreation timestamp (ISO 8601)
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_notes",
    "arguments": {
      "case_id": 42,
      "per_page": 10
    }
  }
}

create_note

Create a note for a case or client.

Arguments

FieldRequiredTypeDescription
bodytrueStringThe note body
typetrueStringThe note type: case or client
reference_idtrueIntegerThe referenced case or client ID
titlefalseStringOptional note title
attachment_ulidsfalseArrayOptional attachment ULIDs to associate

Response

json
{ "note_id": 123, "status": "created" }
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_note",
    "arguments": {
      "title": "Client meeting notes",
      "body": "Discussed case timeline and next steps.",
      "type": "case",
      "reference_id": 42
    }
  }
}

update_note

Update an existing note by ULID. At least one of title, body, or attachment_ids must be provided.

Arguments

FieldRequiredTypeDescription
ulidtrueStringThe note ULID
titlefalseStringReplacement title
bodyfalseStringReplacement note body (cannot be empty)
attachment_idsfalseArrayReplacement attachment ULIDs

Returns the updated note object.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_note",
    "arguments": {
      "ulid": "01J5A3B4C5D6E7F8G9H0",
      "body": "Updated meeting notes with action items."
    }
  }
}

Case Types

list_case_types

List case types for the company. Supports pagination and search by name.

Arguments

FieldRequiredTypeDescription
pagefalseIntegerPage number (1-based). Defaults to 1
per_pagefalseIntegerItems per page. Defaults to 25
namefalseStringFilter case types by name

Response Fields

FieldTypeDescription
idIntegerCase type ID
nameStringCase type name
descriptionStringCase type description
pronunciationStringPronunciation hint
number_of_casesIntegerNumber of associated cases
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_case_types",
    "arguments": {}
  }
}

get_case_type

Get a single case type by ID.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe case type ID

Returns the same fields as list_case_types for a single case type.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_case_type",
    "arguments": { "id": 3 }
  }
}

create_case_type

Create a new case type.

Arguments

FieldRequiredTypeDescription
nametrueStringCase type name
descriptionfalseStringCase type description
pronunciationfalseStringOptional pronunciation hint

Returns the created case type object.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_case_type",
    "arguments": {
      "name": "Workers Compensation",
      "pronunciation": "workers comp"
    }
  }
}

update_case_type

Update an existing case type.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe case type ID to update
namefalseStringNew case type name
descriptionfalseStringNew case type description
pronunciationfalseStringNew pronunciation hint

Returns the updated case type object.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_case_type",
    "arguments": {
      "id": 3,
      "description": "Workers' compensation injury cases"
    }
  }
}

list_case_type_custom_fields

List custom fields for a case type.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe case type ID

Response

Returns an object with an items array of custom field objects (same shape as create_case_type_custom_field).

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_case_type_custom_fields",
    "arguments": { "id": 3 }
  }
}
Response
json
{
  "items": [
    {
      "id": 101,
      "key": "accident_date",
      "source": "manual",
      "created_at": "2025-06-15T14:30:00Z"
    }
  ]
}

create_case_type_custom_field

Create a manual custom field for a case type.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe case type ID
keytrueStringThe custom field key

Returns the created custom field object.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_case_type_custom_field",
    "arguments": {
      "id": 3,
      "key": "accident_date"
    }
  }
}

Case Statuses

list_case_statuses

List case statuses for the company. Supports pagination and search by name.

Arguments

FieldRequiredTypeDescription
pagefalseIntegerPage number (1-based). Defaults to 1
per_pagefalseIntegerItems per page. Defaults to 25
namefalseStringFilter case statuses by name

Response Fields

FieldTypeDescription
idIntegerCase status ID
nameStringCase status name
descriptionStringCase status description
priorityIntegerDisplay priority
number_of_casesIntegerNumber of associated cases
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_case_statuses",
    "arguments": {}
  }
}

get_case_status

Get a single case status by ID.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe case status ID

Returns the same fields as list_case_statuses for a single case status.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_case_status",
    "arguments": { "id": 7 }
  }
}

create_case_status

Create a new case status.

Arguments

FieldRequiredTypeDescription
nametrueStringCase status name
descriptionfalseStringCase status description
priorityfalseIntegerDisplay priority
parent_idfalseIntegerParent status ID for hierarchy

Returns the created case status object.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_case_status",
    "arguments": {
      "name": "Under Review",
      "priority": 3,
      "parent_id": 1
    }
  }
}

update_case_status

Update an existing case status.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe case status ID to update
namefalseStringNew case status name
descriptionfalseStringNew case status description
priorityfalseIntegerNew display priority
parent_idfalseIntegerNew parent status ID

Returns the updated case status object.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_case_status",
    "arguments": {
      "id": 7,
      "name": "In Review",
      "priority": 4
    }
  }
}

list_hierarchical_case_statuses

List case statuses in a parent-child hierarchy. Takes no arguments.

Response

Returns an object with an items array. Each element is a root status with optional nested children (same structure), forming a tree.

FieldTypeDescription
itemsArrayRoot-level statuses
items[].idIntegerCase status ID
items[].nameStringCase status name
items[].descriptionStringCase status description
items[].priorityIntegerDisplay priority
items[].parent_idIntegerParent status ID, if any
items[].childrenArrayNested child statuses (recursive shape)
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_hierarchical_case_statuses",
    "arguments": {}
  }
}
Response
json
{
  "items": [
    {
      "id": 1,
      "name": "Open",
      "description": "New matters",
      "priority": 1,
      "children": [
        {
          "id": 7,
          "name": "Under Review",
          "priority": 2,
          "parent_id": 1,
          "children": []
        }
      ]
    }
  ]
}

reorder_case_statuses

Bulk update case status priorities.

Arguments

FieldRequiredTypeDescription
itemstrueArrayList of status priority updates
items[].idtrueIntegerCase status ID
items[].prioritytrueIntegerNew priority value

Response

json
{ "status": "reordered" }
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "reorder_case_statuses",
    "arguments": {
      "items": [
        { "id": 1, "priority": 1 },
        { "id": 7, "priority": 2 },
        { "id": 3, "priority": 3 }
      ]
    }
  }
}

Webhooks

list_webhooks

List all webhooks configured for the company. Takes no arguments.

Response Fields

The structured result is an object with an items array. Each element describes one webhook.

FieldTypeDescription
itemsArrayWebhook entries
items[].idIntegerWebhook ID
items[].nameStringWebhook name
items[].urlStringDestination URL
items[].enabledBooleanWhether the webhook is enabled
items[].event_typesArraySubscribed event types
items[].case_type_idsArrayCase type filters
items[].campaign_idsArrayCampaign filters
items[].api_key_idIntegerAPI key used for delivery
items[].last_delivery_statusStringStatus of last delivery
items[].last_http_statusIntegerHTTP status of last delivery
items[].last_attempt_atStringTimestamp of last delivery attempt
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_webhooks",
    "arguments": {}
  }
}
Response
json
{
  "items": [
    {
      "id": 12,
      "name": "Case Updates",
      "url": "https://example.com/webhooks/kayse",
      "enabled": true,
      "event_types": ["case_created", "case_updated"],
      "case_type_ids": [3],
      "campaign_ids": [],
      "last_delivery_status": "success",
      "last_http_status": 200,
      "last_attempt_at": "2025-06-15T14:30:00Z"
    }
  ]
}

get_webhook

Get a single webhook by ID.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe webhook ID

Returns the webhook object (same fields as each element of list_webhooks's items array, except delivery status fields).

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_webhook",
    "arguments": { "id": 12 }
  }
}

create_webhook

Create a new webhook.

Arguments

FieldRequiredTypeDescription
nametrueStringWebhook name
urltrueStringWebhook destination URL
enabledfalseBooleanWhether the webhook is enabled
event_typesfalseArraySubscribed event types. Empty means all supported events
case_type_idsfalseArrayOptional case type filters
campaign_idsfalseArrayOptional campaign filters
api_key_idfalseIntegerOptional API key ID for delivery

Returns the created webhook object.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_webhook",
    "arguments": {
      "name": "Case Updates",
      "url": "https://example.com/webhooks/kayse",
      "enabled": true,
      "event_types": ["case_created", "case_updated"]
    }
  }
}

update_webhook

Update an existing webhook.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe webhook ID to update
nametrueStringWebhook name
urltrueStringWebhook destination URL
enabledfalseBooleanWhether the webhook is enabled
event_typesfalseArraySubscribed event types
case_type_idsfalseArrayOptional case type filters
campaign_idsfalseArrayOptional campaign filters
api_key_idfalseIntegerOptional API key ID for delivery

Returns the updated webhook object.

Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_webhook",
    "arguments": {
      "id": 12,
      "name": "Case Updates v2",
      "url": "https://example.com/webhooks/kayse",
      "enabled": true
    }
  }
}

list_webhook_logs

List recent delivery logs for a webhook.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe webhook ID

Response Fields

The structured result is an object with an items array. Each element is one delivery log entry.

FieldTypeDescription
itemsArrayDelivery log entries
items[].idIntegerLog ID
items[].delivery_idIntegerDelivery ID
items[].event_typeStringEvent type
items[].event_keyStringEvent key
items[].destination_urlStringDestination URL
items[].triggered_byStringTrigger source
items[].attempt_numberIntegerDelivery attempt number
items[].http_statusIntegerHTTP response status code
items[].duration_msIntegerDelivery duration in milliseconds
items[].successBooleanWhether delivery succeeded
items[].error_messageStringError message (on failure)
items[].request_headersObjectRequest headers sent
items[].request_payloadObjectRequest payload sent
items[].response_bodyStringResponse body received
items[].created_atStringLog timestamp (ISO 8601)
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_webhook_logs",
    "arguments": { "id": 12 }
  }
}
Response
json
{
  "items": [
    {
      "id": 456,
      "delivery_id": 789,
      "event_type": "case_updated",
      "event_key": "case:42",
      "destination_url": "https://example.com/webhooks/kayse",
      "triggered_by": "api",
      "attempt_number": 1,
      "http_status": 200,
      "duration_ms": 145,
      "success": true,
      "request_headers": {},
      "request_payload": {},
      "created_at": "2025-06-15T14:30:00Z"
    }
  ]
}

test_webhook

Queue a test delivery for a webhook.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe webhook ID

Response

json
{ "status": "test queued" }
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "test_webhook",
    "arguments": { "id": 12 }
  }
}

replay_webhook_log

Replay a previous webhook delivery log entry.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe webhook ID
log_idtrueIntegerThe webhook log ID to replay

Response

json
{ "status": "replay queued" }
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "replay_webhook_log",
    "arguments": { "id": 12, "log_id": 456 }
  }
}

Admins

list_admins

List admins (staff/users) for the company. Supports pagination and keyword search.

Arguments

FieldRequiredTypeDescription
pagefalseIntegerPage number (1-based). Defaults to 1
per_pagefalseIntegerItems per page. Defaults to 25
keyfalseStringSearch keyword to filter admins by name, email, or phone

Response Fields (list)

FieldTypeDescription
idIntegerAdmin ID
full_nameStringAdmin full name
emailStringEmail address
phoneStringPhone number
roleStringCompany role
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_admins",
    "arguments": { "key": "john" }
  }
}

get_admin

Get a single admin by ID with full role and scope details.

Arguments

FieldRequiredTypeDescription
idtrueIntegerThe admin ID

Response Fields (detail)

FieldTypeDescription
idIntegerAdmin ID
full_nameStringAdmin full name
emailStringEmail address
phoneStringPhone number
roleStringCompany role
statusIntegerAccount status
global_roleStringGlobal role
scope_idsArrayScope IDs the admin has access to
scope_namesArrayScope names the admin has access to
company_idIntegerCompany ID
last_active_companyIntegerLast active company ID
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_admin",
    "arguments": { "id": 5 }
  }
}

Audit Logs

list_audit_logs

List audit log entries for the company. Supports filtering by case, client, and action.

Arguments

FieldRequiredTypeDescription
pagefalseIntegerPage number (1-based). Defaults to 1
per_pagefalseIntegerItems per page. Defaults to 25
case_idfalseIntegerFilter by case ID
client_idfalseIntegerFilter by client ID
actionfalseStringFilter by action type (e.g. create, update, delete)

Response Fields

FieldTypeDescription
totalIntegerTotal number of matching records
pageIntegerCurrent page
page_sizeIntegerItems per page
logsArrayArray of audit log entries
logs[].created_atStringTimestamp (ISO 8601)
logs[].actorStringActor identifier
logs[].actor_nameStringActor display name
logs[].actionStringAction performed
logs[].record_database_nameStringAffected resource type
logs[].record_database_idStringAffected resource ID
logs[].sourceStringAction source
Request
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_audit_logs",
    "arguments": {
      "case_id": 42,
      "action": "update"
    }
  }
}
Response
json
{
  "total": 15,
  "page": 1,
  "page_size": 25,
  "logs": [
    {
      "created_at": "2025-06-15T14:30:00Z",
      "actor": "admin",
      "actor_name": "John Smith",
      "action": "update",
      "record_database_name": "cases",
      "record_database_id": "42",
      "source": "dashboard"
    }
  ]
}

Current Write Scope

MCP currently exposes read tools, create and update tools, and selected operational actions. Delete operations are not currently exposed through MCP.

Permissions and Access Control

The MCP server uses the same authentication, company scoping, and access controls as the Public API.

  • API keys are passed with Bearer authentication
  • Tool results are restricted to the company associated with the API key
  • Existing role and scope restrictions continue to apply to the underlying data
  • MCP does not bypass webhook, case-type, or case-status validations used elsewhere in Kayse AI

Configuration

To use Kayse AI with Claude Desktop or other MCP clients, you'll need to configure the MCP server settings. See the MCP Integration Guide for detailed setup instructions.

TIP

The MCP server uses the same authentication and permissions as the Public API. Make sure your API key has the necessary permissions for the operations you want to perform.

Turn unreachable clients into paid cases.