KosmoKrator

other

Samsara CLI for AI Agents

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

6 functions 6 read 0 write Bearer token auth

Samsara CLI Setup

Samsara can be configured headlessly with `kosmokrator integrations:configure samsara`.

# 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 samsara --set access_token="$SAMSARA_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor samsara --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 SAMSARA_ACCESS_TOKEN Secret secret yes Access Token
url SAMSARA_URL URL url no Base URL

Call Samsara Headlessly

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

kosmo integrations:call samsara.samsara_list_vehicles '{
  "limit": 1,
  "after": "example_after"
}' --json

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

kosmo integrations:samsara samsara_list_vehicles '{
  "limit": 1,
  "after": "example_after"
}' --json

Agent Discovery Commands

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

kosmo integrations:docs samsara --json
kosmo integrations:docs samsara.samsara_list_vehicles --json
kosmo integrations:schema samsara.samsara_list_vehicles --json
kosmo integrations:search "Samsara" --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 Samsara.

samsara.samsara_list_vehicles

Read read

List fleet vehicles from Samsara. Returns vehicle details including name, VIN, make, model, year, and GPS location. Supports pagination.

Parameters
limit, after

Generic CLI call

kosmo integrations:call samsara.samsara_list_vehicles '{"limit":1,"after":"example_after"}' --json

Provider shortcut

kosmo integrations:samsara samsara_list_vehicles '{"limit":1,"after":"example_after"}' --json

samsara.samsara_get_vehicle

Read read

Get detailed information about a specific vehicle by its Samsara ID, including name, VIN, make, model, year, GPS location, and odometer reading.

Parameters
id

Generic CLI call

kosmo integrations:call samsara.samsara_get_vehicle '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:samsara samsara_get_vehicle '{"id":"example_id"}' --json

samsara.samsara_list_drivers

Read read

List fleet drivers from Samsara. Returns driver details including name, username, email, phone, and driver license info. Supports pagination.

Parameters
limit, after

Generic CLI call

kosmo integrations:call samsara.samsara_list_drivers '{"limit":1,"after":"example_after"}' --json

Provider shortcut

kosmo integrations:samsara samsara_list_drivers '{"limit":1,"after":"example_after"}' --json

samsara.samsara_get_driver

Read read

Get detailed information about a specific driver by their Samsara ID, including name, username, email, phone, and driver license details.

Parameters
id

Generic CLI call

kosmo integrations:call samsara.samsara_get_driver '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:samsara samsara_get_driver '{"id":"example_id"}' --json

samsara.samsara_list_sensors

Read read

List IoT sensors from Samsara. Returns sensor details including name, type, model, connectivity, and current readings. Supports pagination.

Parameters
limit, after

Generic CLI call

kosmo integrations:call samsara.samsara_list_sensors '{"limit":1,"after":"example_after"}' --json

Provider shortcut

kosmo integrations:samsara samsara_list_sensors '{"limit":1,"after":"example_after"}' --json

samsara.samsara_get_current_user

Read read

Get the currently authenticated Samsara user profile, including name, email, role, and organization details.

Parameters
none

Generic CLI call

kosmo integrations:call samsara.samsara_get_current_user '{}' --json

Provider shortcut

kosmo integrations:samsara samsara_get_current_user '{}' --json

Function Schemas

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

samsara.samsara_list_vehicles

List fleet vehicles from Samsara. Returns vehicle details including name, VIN, make, model, year, and GPS location. Supports pagination.

Operation
Read read
Schema command
kosmo integrations:schema samsara.samsara_list_vehicles --json
ParameterTypeRequiredDescription
limit integer no Maximum number of vehicles to return per page (default: 100, max: 512).
after string no Pagination cursor — pass the "pagination.endCursor" value from a previous response to fetch the next page.

samsara.samsara_get_vehicle

Get detailed information about a specific vehicle by its Samsara ID, including name, VIN, make, model, year, GPS location, and odometer reading.

Operation
Read read
Schema command
kosmo integrations:schema samsara.samsara_get_vehicle --json
ParameterTypeRequiredDescription
id string yes The Samsara vehicle ID (e.g., "123456789012345").

samsara.samsara_list_drivers

List fleet drivers from Samsara. Returns driver details including name, username, email, phone, and driver license info. Supports pagination.

Operation
Read read
Schema command
kosmo integrations:schema samsara.samsara_list_drivers --json
ParameterTypeRequiredDescription
limit integer no Maximum number of drivers to return per page (default: 100, max: 512).
after string no Pagination cursor — pass the "pagination.endCursor" value from a previous response to fetch the next page.

samsara.samsara_get_driver

Get detailed information about a specific driver by their Samsara ID, including name, username, email, phone, and driver license details.

Operation
Read read
Schema command
kosmo integrations:schema samsara.samsara_get_driver --json
ParameterTypeRequiredDescription
id string yes The Samsara driver ID (e.g., "123456789012345").

samsara.samsara_list_sensors

List IoT sensors from Samsara. Returns sensor details including name, type, model, connectivity, and current readings. Supports pagination.

Operation
Read read
Schema command
kosmo integrations:schema samsara.samsara_list_sensors --json
ParameterTypeRequiredDescription
limit integer no Maximum number of sensors to return per page (default: 100, max: 512).
after string no Pagination cursor — pass the "pagination.endCursor" value from a previous response to fetch the next page.

samsara.samsara_get_current_user

Get the currently authenticated Samsara user profile, including name, email, role, and organization details.

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