KosmoKrator

communication

Intercom CLI for AI Agents

Use the Intercom CLI from KosmoKrator to call Intercom tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 6 read 1 write Bearer token auth

Intercom CLI Setup

Intercom can be configured headlessly with `kosmokrator integrations:configure intercom`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure intercom --set access_token="$INTERCOM_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor intercom --json
kosmokrator integrations:status --json

Credentials

Authentication type: Bearer token bearer_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token INTERCOM_ACCESS_TOKEN Secret secret yes Access Token
base_url INTERCOM_BASE_URL URL url no API Base URL

Call Intercom Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call intercom.intercom_list_conversations '{
  "limit": 1,
  "starting_after": "example_starting_after",
  "sort_order": "example_sort_order",
  "status": "example_status"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:intercom intercom_list_conversations '{
  "limit": 1,
  "starting_after": "example_starting_after",
  "sort_order": "example_sort_order",
  "status": "example_status"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs intercom --json
kosmo integrations:docs intercom.intercom_list_conversations --json
kosmo integrations:schema intercom.intercom_list_conversations --json
kosmo integrations:search "Intercom" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Intercom.

intercom.intercom_list_conversations

Read read

List Intercom conversations with pagination and sorting. Returns conversation IDs, created dates, and state. Use limit, starting_after, and sort_order for pagination and ordering.

Parameters
limit, starting_after, sort_order, status

Generic CLI call

kosmo integrations:call intercom.intercom_list_conversations '{"limit":1,"starting_after":"example_starting_after","sort_order":"example_sort_order","status":"example_status"}' --json

Provider shortcut

kosmo integrations:intercom intercom_list_conversations '{"limit":1,"starting_after":"example_starting_after","sort_order":"example_sort_order","status":"example_status"}' --json

intercom.intercom_get_conversation

Read read

Retrieve an Intercom conversation by its ID. Returns the full conversation including message parts, contacts, and metadata.

Parameters
conversation_id

Generic CLI call

kosmo integrations:call intercom.intercom_get_conversation '{"conversation_id":"example_conversation_id"}' --json

Provider shortcut

kosmo integrations:intercom intercom_get_conversation '{"conversation_id":"example_conversation_id"}' --json

intercom.intercom_create_conversation

Write write

Create a new conversation in Intercom. Requires a user_id (Intercom contact ID) and a message body. Returns the created conversation with its ID.

Parameters
user_id, body

Generic CLI call

kosmo integrations:call intercom.intercom_create_conversation '{"user_id":"example_user_id","body":"example_body"}' --json

Provider shortcut

kosmo integrations:intercom intercom_create_conversation '{"user_id":"example_user_id","body":"example_body"}' --json

intercom.intercom_list_contacts

Read read

List Intercom contacts with pagination. Returns contact IDs, emails, names, and roles. Use limit and starting_after for pagination.

Parameters
limit, starting_after

Generic CLI call

kosmo integrations:call intercom.intercom_list_contacts '{"limit":1,"starting_after":"example_starting_after"}' --json

Provider shortcut

kosmo integrations:intercom intercom_list_contacts '{"limit":1,"starting_after":"example_starting_after"}' --json

intercom.intercom_get_contact

Read read

Retrieve an Intercom contact by its ID. Returns the contact's ID, email, name, phone, role, and custom attributes.

Parameters
contact_id

Generic CLI call

kosmo integrations:call intercom.intercom_get_contact '{"contact_id":"example_contact_id"}' --json

Provider shortcut

kosmo integrations:intercom intercom_get_contact '{"contact_id":"example_contact_id"}' --json

intercom.intercom_list_companies

Read read

List Intercom companies with pagination. Returns company IDs, names, and employee counts. Use limit and starting_after for pagination.

Parameters
limit, starting_after

Generic CLI call

kosmo integrations:call intercom.intercom_list_companies '{"limit":1,"starting_after":"example_starting_after"}' --json

Provider shortcut

kosmo integrations:intercom intercom_list_companies '{"limit":1,"starting_after":"example_starting_after"}' --json

intercom.intercom_get_current_user

Read read

Retrieve the currently authenticated Intercom admin user. Returns the admin's ID, name, email, and avatar. Useful for identifying which workspace or token is in use.

Parameters
none

Generic CLI call

kosmo integrations:call intercom.intercom_get_current_user '{}' --json

Provider shortcut

kosmo integrations:intercom intercom_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

intercom.intercom_list_conversations

List Intercom conversations with pagination and sorting. Returns conversation IDs, created dates, and state. Use limit, starting_after, and sort_order for pagination and ordering.

Operation
Read read
Schema command
kosmo integrations:schema intercom.intercom_list_conversations --json
ParameterTypeRequiredDescription
limit integer no Maximum number of conversations to return (default 20).
starting_after string no Pagination cursor from a previous response.
sort_order string no Sort order: "asc" or "desc".
status string no Filter by conversation status: "open", "closed", or "all".

intercom.intercom_get_conversation

Retrieve an Intercom conversation by its ID. Returns the full conversation including message parts, contacts, and metadata.

Operation
Read read
Schema command
kosmo integrations:schema intercom.intercom_get_conversation --json
ParameterTypeRequiredDescription
conversation_id string yes Intercom conversation ID.

intercom.intercom_create_conversation

Create a new conversation in Intercom. Requires a user_id (Intercom contact ID) and a message body. Returns the created conversation with its ID.

Operation
Write write
Schema command
kosmo integrations:schema intercom.intercom_create_conversation --json
ParameterTypeRequiredDescription
user_id string yes Intercom contact ID (user) to create the conversation for.
body string yes Initial message body for the conversation.

intercom.intercom_list_contacts

List Intercom contacts with pagination. Returns contact IDs, emails, names, and roles. Use limit and starting_after for pagination.

Operation
Read read
Schema command
kosmo integrations:schema intercom.intercom_list_contacts --json
ParameterTypeRequiredDescription
limit integer no Maximum number of contacts to return (default 20).
starting_after string no Pagination cursor from a previous response.

intercom.intercom_get_contact

Retrieve an Intercom contact by its ID. Returns the contact's ID, email, name, phone, role, and custom attributes.

Operation
Read read
Schema command
kosmo integrations:schema intercom.intercom_get_contact --json
ParameterTypeRequiredDescription
contact_id string yes Intercom contact ID.

intercom.intercom_list_companies

List Intercom companies with pagination. Returns company IDs, names, and employee counts. Use limit and starting_after for pagination.

Operation
Read read
Schema command
kosmo integrations:schema intercom.intercom_list_companies --json
ParameterTypeRequiredDescription
limit integer no Maximum number of companies to return (default 20).
starting_after string no Pagination cursor from a previous response.

intercom.intercom_get_current_user

Retrieve the currently authenticated Intercom admin user. Returns the admin's ID, name, email, and avatar. Useful for identifying which workspace or token is in use.

Operation
Read read
Schema command
kosmo integrations:schema intercom.intercom_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.