productivity
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.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 reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
access_token | GAINSIGHT_ACCESS_TOKEN | Secret secret | yes | Access Token |
url | GAINSIGHT_URL | URL url | no | Gainsight API URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call gainsight.gainsight_list_companies '{"page":1,"limit":1,"search":"example_search"}' --json kosmo integrations:gainsight gainsight_list_companies '{"page":1,"limit":1,"search":"example_search"}' --json Discovery
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 Automation Contexts
The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.
CLI Functions
Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.
gainsight.gainsight_list_companies
List companies from Gainsight. Returns company details including name, industry, ARR, health score, and lifecycle stage.
read - Parameters
- page, limit, search
kosmo integrations:call gainsight.gainsight_list_companies '{"page":1,"limit":1,"search":"example_search"}' --json kosmo integrations:gainsight gainsight_list_companies '{"page":1,"limit":1,"search":"example_search"}' --json gainsight.gainsight_get_company
Get detailed information about a specific company in Gainsight, including health score, ARR, lifecycle stage, and CSM assignment.
read - Parameters
- companyId
kosmo integrations:call gainsight.gainsight_get_company '{"companyId":"example_companyId"}' --json kosmo integrations:gainsight gainsight_get_company '{"companyId":"example_companyId"}' --json gainsight.gainsight_list_users
List users in the Gainsight tenant. Returns user details including name, email, role, and last active date.
read - Parameters
- page, limit, role
kosmo integrations:call gainsight.gainsight_list_users '{"page":1,"limit":1,"role":"example_role"}' --json kosmo integrations:gainsight gainsight_list_users '{"page":1,"limit":1,"role":"example_role"}' --json gainsight.gainsight_get_user
Get detailed information about a specific user in Gainsight, including role, assigned accounts, and activity data.
read - Parameters
- userId
kosmo integrations:call gainsight.gainsight_get_user '{"userId":"example_userId"}' --json kosmo integrations:gainsight gainsight_get_user '{"userId":"example_userId"}' --json gainsight.gainsight_list_surveys
List surveys from Gainsight. Returns survey details including name, type, status, response count, and creation date.
read - Parameters
- page, limit, status
kosmo integrations:call gainsight.gainsight_list_surveys '{"page":1,"limit":1,"status":"example_status"}' --json kosmo integrations:gainsight gainsight_list_surveys '{"page":1,"limit":1,"status":"example_status"}' --json gainsight.gainsight_get_survey
Get detailed information about a specific survey in Gainsight, including questions, response statistics, and distribution settings.
read - Parameters
- surveyId
kosmo integrations:call gainsight.gainsight_get_survey '{"surveyId":"example_surveyId"}' --json kosmo integrations:gainsight gainsight_get_survey '{"surveyId":"example_surveyId"}' --json gainsight.gainsight_get_current_user
Get the currently authenticated Gainsight user profile. Useful for verifying credentials and understanding whose data is being accessed.
read - Parameters
- none
kosmo integrations:call gainsight.gainsight_get_current_user '{}' --json 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 3 parameters
kosmo integrations:schema gainsight.gainsight_list_companies --json | Parameter | Type | Required | Description |
|---|---|---|---|
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 1 parameters
kosmo integrations:schema gainsight.gainsight_get_company --json | Parameter | Type | Required | Description |
|---|---|---|---|
companyId | string | yes | The unique company identifier (Gainsight Company ID). |
gainsight.gainsight_list_users 3 parameters
kosmo integrations:schema gainsight.gainsight_list_users --json | Parameter | Type | Required | Description |
|---|---|---|---|
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 1 parameters
kosmo integrations:schema gainsight.gainsight_get_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
userId | string | yes | The unique user identifier (Gainsight User ID). |
gainsight.gainsight_list_surveys 3 parameters
kosmo integrations:schema gainsight.gainsight_list_surveys --json | Parameter | Type | Required | Description |
|---|---|---|---|
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 1 parameters
kosmo integrations:schema gainsight.gainsight_get_survey --json | Parameter | Type | Required | Description |
|---|---|---|---|
surveyId | string | yes | The unique survey identifier (Gainsight Survey ID). |
gainsight.gainsight_get_current_user 0 parameters
kosmo integrations:schema gainsight.gainsight_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| 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.