KosmoKrator

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, configure, and verify
# 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.

KeyEnv varTypeRequiredLabel
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.

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

Discovery

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

Discovery commands
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 read
Parameters
page, limit, search
Generic call
kosmo integrations:call gainsight.gainsight_list_companies '{"page":1,"limit":1,"search":"example_search"}' --json
Shortcut
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 read
Parameters
companyId
Generic call
kosmo integrations:call gainsight.gainsight_get_company '{"companyId":"example_companyId"}' --json
Shortcut
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 read
Parameters
page, limit, role
Generic call
kosmo integrations:call gainsight.gainsight_list_users '{"page":1,"limit":1,"role":"example_role"}' --json
Shortcut
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 read
Parameters
userId
Generic call
kosmo integrations:call gainsight.gainsight_get_user '{"userId":"example_userId"}' --json
Shortcut
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 read
Parameters
page, limit, status
Generic call
kosmo integrations:call gainsight.gainsight_list_surveys '{"page":1,"limit":1,"status":"example_status"}' --json
Shortcut
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 read
Parameters
surveyId
Generic call
kosmo integrations:call gainsight.gainsight_get_survey '{"surveyId":"example_surveyId"}' --json
Shortcut
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 read
Parameters
none
Generic call
kosmo integrations:call gainsight.gainsight_get_current_user '{}' --json
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 3 parameters
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 1 parameters
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 3 parameters
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 1 parameters
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 3 parameters
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 1 parameters
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 0 parameters
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.