KosmoKrator

sales

Gainsight CLI for AI Agents

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

7 functions 7 read 0 write Manual OAuth token auth

Gainsight CLI Setup

Gainsight can be configured headlessly with `kosmokrator integrations:configure gainsight`.

# 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 gainsight --set access_token="$GAINSIGHT_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor gainsight --json
kosmokrator integrations:status --json

Credentials

Authentication type: Manual OAuth token oauth2_manual_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 GAINSIGHT_ACCESS_TOKEN Secret secret yes Access Token
url GAINSIGHT_URL URL url no Gainsight API URL

Call Gainsight Headlessly

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

kosmo integrations:call gainsight.gainsight_list_companies '{
  "page": 1,
  "limit": 1,
  "search": "example_search"
}' --json

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

kosmo integrations:gainsight gainsight_list_companies '{
  "page": 1,
  "limit": 1,
  "search": "example_search"
}' --json

Agent Discovery Commands

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

kosmo integrations:docs gainsight --json
kosmo integrations:docs gainsight.gainsight_list_companies --json
kosmo integrations:schema gainsight.gainsight_list_companies --json
kosmo integrations:search "Gainsight" --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 Gainsight.

gainsight.gainsight_list_companies

Read read

List companies from Gainsight. Returns company details including name, industry, ARR, health score, and lifecycle stage.

Parameters
page, limit, search

Generic CLI call

kosmo integrations:call gainsight.gainsight_list_companies '{"page":1,"limit":1,"search":"example_search"}' --json

Provider shortcut

kosmo integrations:gainsight gainsight_list_companies '{"page":1,"limit":1,"search":"example_search"}' --json

gainsight.gainsight_get_company

Read read

Get detailed information about a specific company in Gainsight, including health score, ARR, lifecycle stage, and CSM assignment.

Parameters
companyId

Generic CLI call

kosmo integrations:call gainsight.gainsight_get_company '{"companyId":"example_companyId"}' --json

Provider shortcut

kosmo integrations:gainsight gainsight_get_company '{"companyId":"example_companyId"}' --json

gainsight.gainsight_list_users

Read read

List users in the Gainsight tenant. Returns user details including name, email, role, and last active date.

Parameters
page, limit, role

Generic CLI call

kosmo integrations:call gainsight.gainsight_list_users '{"page":1,"limit":1,"role":"example_role"}' --json

Provider shortcut

kosmo integrations:gainsight gainsight_list_users '{"page":1,"limit":1,"role":"example_role"}' --json

gainsight.gainsight_get_user

Read read

Get detailed information about a specific user in Gainsight, including role, assigned accounts, and activity data.

Parameters
userId

Generic CLI call

kosmo integrations:call gainsight.gainsight_get_user '{"userId":"example_userId"}' --json

Provider shortcut

kosmo integrations:gainsight gainsight_get_user '{"userId":"example_userId"}' --json

gainsight.gainsight_list_surveys

Read read

List surveys from Gainsight. Returns survey details including name, type, status, response count, and creation date.

Parameters
page, limit, status

Generic CLI call

kosmo integrations:call gainsight.gainsight_list_surveys '{"page":1,"limit":1,"status":"example_status"}' --json

Provider shortcut

kosmo integrations:gainsight gainsight_list_surveys '{"page":1,"limit":1,"status":"example_status"}' --json

gainsight.gainsight_get_survey

Read read

Get detailed information about a specific survey in Gainsight, including questions, response statistics, and distribution settings.

Parameters
surveyId

Generic CLI call

kosmo integrations:call gainsight.gainsight_get_survey '{"surveyId":"example_surveyId"}' --json

Provider shortcut

kosmo integrations:gainsight gainsight_get_survey '{"surveyId":"example_surveyId"}' --json

gainsight.gainsight_get_current_user

Read read

Get the currently authenticated Gainsight user profile. Useful for verifying credentials and understanding whose data is being accessed.

Parameters
none

Generic CLI call

kosmo integrations:call gainsight.gainsight_get_current_user '{}' --json

Provider shortcut

kosmo integrations:gainsight gainsight_get_current_user '{}' --json

Function Schemas

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

gainsight.gainsight_list_companies

List companies from Gainsight. Returns company details including name, industry, ARR, health score, and lifecycle stage.

Operation
Read read
Schema command
kosmo integrations:schema gainsight.gainsight_list_companies --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (starting from 1).
limit integer no Maximum number of companies to return (default: 50).
search string no Search term to filter companies by name.

gainsight.gainsight_get_company

Get detailed information about a specific company in Gainsight, including health score, ARR, lifecycle stage, and CSM assignment.

Operation
Read read
Schema command
kosmo integrations:schema gainsight.gainsight_get_company --json
ParameterTypeRequiredDescription
companyId string yes The unique company identifier (Gainsight Company ID).

gainsight.gainsight_list_users

List users in the Gainsight tenant. Returns user details including name, email, role, and last active date.

Operation
Read read
Schema command
kosmo integrations:schema gainsight.gainsight_list_users --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (starting from 1).
limit integer no Maximum number of users to return (default: 50).
role string no Filter users by role (e.g., "Admin", "CSM", "Manager").

gainsight.gainsight_get_user

Get detailed information about a specific user in Gainsight, including role, assigned accounts, and activity data.

Operation
Read read
Schema command
kosmo integrations:schema gainsight.gainsight_get_user --json
ParameterTypeRequiredDescription
userId string yes The unique user identifier (Gainsight User ID).

gainsight.gainsight_list_surveys

List surveys from Gainsight. Returns survey details including name, type, status, response count, and creation date.

Operation
Read read
Schema command
kosmo integrations:schema gainsight.gainsight_list_surveys --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (starting from 1).
limit integer no Maximum number of surveys to return (default: 50).
status string no Filter surveys by status (e.g., "active", "draft", "closed").

gainsight.gainsight_get_survey

Get detailed information about a specific survey in Gainsight, including questions, response statistics, and distribution settings.

Operation
Read read
Schema command
kosmo integrations:schema gainsight.gainsight_get_survey --json
ParameterTypeRequiredDescription
surveyId string yes The unique survey identifier (Gainsight Survey ID).

gainsight.gainsight_get_current_user

Get the currently authenticated Gainsight user profile. Useful for verifying credentials and understanding whose data is being accessed.

Operation
Read read
Schema command
kosmo integrations:schema gainsight.gainsight_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.