data
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.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 reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
access_token | SAMSARA_ACCESS_TOKEN | Secret secret | yes | Access Token |
url | SAMSARA_URL | URL url | no | Base URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call samsara.samsara_list_vehicles '{"limit":1,"after":"example_after"}' --json kosmo integrations:samsara samsara_list_vehicles '{"limit":1,"after":"example_after"}' --json Discovery
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 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.
samsara.samsara_list_vehicles
List fleet vehicles from Samsara. Returns vehicle details including name, VIN, make, model, year, and GPS location. Supports pagination.
read - Parameters
- limit, after
kosmo integrations:call samsara.samsara_list_vehicles '{"limit":1,"after":"example_after"}' --json kosmo integrations:samsara samsara_list_vehicles '{"limit":1,"after":"example_after"}' --json 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.
read - Parameters
- id
kosmo integrations:call samsara.samsara_get_vehicle '{"id":"example_id"}' --json kosmo integrations:samsara samsara_get_vehicle '{"id":"example_id"}' --json samsara.samsara_list_drivers
List fleet drivers from Samsara. Returns driver details including name, username, email, phone, and driver license info. Supports pagination.
read - Parameters
- limit, after
kosmo integrations:call samsara.samsara_list_drivers '{"limit":1,"after":"example_after"}' --json kosmo integrations:samsara samsara_list_drivers '{"limit":1,"after":"example_after"}' --json samsara.samsara_get_driver
Get detailed information about a specific driver by their Samsara ID, including name, username, email, phone, and driver license details.
read - Parameters
- id
kosmo integrations:call samsara.samsara_get_driver '{"id":"example_id"}' --json kosmo integrations:samsara samsara_get_driver '{"id":"example_id"}' --json samsara.samsara_list_sensors
List IoT sensors from Samsara. Returns sensor details including name, type, model, connectivity, and current readings. Supports pagination.
read - Parameters
- limit, after
kosmo integrations:call samsara.samsara_list_sensors '{"limit":1,"after":"example_after"}' --json kosmo integrations:samsara samsara_list_sensors '{"limit":1,"after":"example_after"}' --json samsara.samsara_get_current_user
Get the currently authenticated Samsara user profile, including name, email, role, and organization details.
read - Parameters
- none
kosmo integrations:call samsara.samsara_get_current_user '{}' --json kosmo integrations:samsara samsara_get_current_user '{}' --json samsara.samsara_api_get
Call a safe relative Samsara API path with GET.
read - Parameters
- none
kosmo integrations:call samsara.samsara_api_get '{}' --json kosmo integrations:samsara samsara_api_get '{}' --json samsara.samsara_api_post
Call a safe relative Samsara API path with POST.
write - Parameters
- none
kosmo integrations:call samsara.samsara_api_post '{}' --json kosmo integrations:samsara samsara_api_post '{}' --json samsara.samsara_api_patch
Call a safe relative Samsara API path with PATCH.
write - Parameters
- none
kosmo integrations:call samsara.samsara_api_patch '{}' --json kosmo integrations:samsara samsara_api_patch '{}' --json samsara.samsara_api_delete
Call a safe relative Samsara API path with DELETE.
write - Parameters
- none
kosmo integrations:call samsara.samsara_api_delete '{}' --json kosmo integrations:samsara samsara_api_delete '{}' --json samsara.samsara_get_vehicle_stats
Get latest vehicle stats.
read - Parameters
- none
kosmo integrations:call samsara.samsara_get_vehicle_stats '{}' --json kosmo integrations:samsara samsara_get_vehicle_stats '{}' --json samsara.samsara_get_vehicle_stats_history
Get historical vehicle stats.
read - Parameters
- none
kosmo integrations:call samsara.samsara_get_vehicle_stats_history '{}' --json kosmo integrations:samsara samsara_get_vehicle_stats_history '{}' --json samsara.samsara_get_vehicle_stats_feed
Follow a vehicle stats feed.
read - Parameters
- none
kosmo integrations:call samsara.samsara_get_vehicle_stats_feed '{}' --json kosmo integrations:samsara samsara_get_vehicle_stats_feed '{}' --json samsara.samsara_list_trailers
List trailers.
read - Parameters
- none
kosmo integrations:call samsara.samsara_list_trailers '{}' --json kosmo integrations:samsara samsara_list_trailers '{}' --json samsara.samsara_get_trailer
Retrieve a trailer.
read - Parameters
- none
kosmo integrations:call samsara.samsara_get_trailer '{}' --json kosmo integrations:samsara samsara_get_trailer '{}' --json samsara.samsara_create_trailer
Create a trailer.
write - Parameters
- none
kosmo integrations:call samsara.samsara_create_trailer '{}' --json kosmo integrations:samsara samsara_create_trailer '{}' --json samsara.samsara_update_trailer
Update a trailer.
write - Parameters
- none
kosmo integrations:call samsara.samsara_update_trailer '{}' --json kosmo integrations:samsara samsara_update_trailer '{}' --json samsara.samsara_delete_trailer
Delete a trailer.
write - Parameters
- none
kosmo integrations:call samsara.samsara_delete_trailer '{}' --json kosmo integrations:samsara samsara_delete_trailer '{}' --json samsara.samsara_get_trailer_stats
Get latest trailer stats.
read - Parameters
- none
kosmo integrations:call samsara.samsara_get_trailer_stats '{}' --json kosmo integrations:samsara samsara_get_trailer_stats '{}' --json samsara.samsara_get_trailer_stats_history
Get historical trailer stats.
read - Parameters
- none
kosmo integrations:call samsara.samsara_get_trailer_stats_history '{}' --json kosmo integrations:samsara samsara_get_trailer_stats_history '{}' --json samsara.samsara_get_trailer_stats_feed
Follow a trailer stats feed.
read - Parameters
- none
kosmo integrations:call samsara.samsara_get_trailer_stats_feed '{}' --json kosmo integrations:samsara samsara_get_trailer_stats_feed '{}' --json samsara.samsara_list_equipment
List equipment.
read - Parameters
- none
kosmo integrations:call samsara.samsara_list_equipment '{}' --json kosmo integrations:samsara samsara_list_equipment '{}' --json samsara.samsara_get_equipment
Retrieve equipment.
read - Parameters
- none
kosmo integrations:call samsara.samsara_get_equipment '{}' --json kosmo integrations:samsara samsara_get_equipment '{}' --json samsara.samsara_get_equipment_stats
Get latest equipment stats.
read - Parameters
- none
kosmo integrations:call samsara.samsara_get_equipment_stats '{}' --json kosmo integrations:samsara samsara_get_equipment_stats '{}' --json samsara.samsara_get_equipment_stats_history
Get historical equipment stats.
read - Parameters
- none
kosmo integrations:call samsara.samsara_get_equipment_stats_history '{}' --json kosmo integrations:samsara samsara_get_equipment_stats_history '{}' --json samsara.samsara_get_equipment_stats_feed
Follow an equipment stats feed.
read - Parameters
- none
kosmo integrations:call samsara.samsara_get_equipment_stats_feed '{}' --json kosmo integrations:samsara samsara_get_equipment_stats_feed '{}' --json samsara.samsara_list_routes
List routes.
read - Parameters
- none
kosmo integrations:call samsara.samsara_list_routes '{}' --json kosmo integrations:samsara samsara_list_routes '{}' --json samsara.samsara_get_route
Retrieve a route.
read - Parameters
- none
kosmo integrations:call samsara.samsara_get_route '{}' --json kosmo integrations:samsara samsara_get_route '{}' --json samsara.samsara_create_route
Create a route.
write - Parameters
- none
kosmo integrations:call samsara.samsara_create_route '{}' --json kosmo integrations:samsara samsara_create_route '{}' --json samsara.samsara_update_route
Update a route.
write - Parameters
- none
kosmo integrations:call samsara.samsara_update_route '{}' --json kosmo integrations:samsara samsara_update_route '{}' --json samsara.samsara_delete_route
Delete a route.
write - Parameters
- none
kosmo integrations:call samsara.samsara_delete_route '{}' --json kosmo integrations:samsara samsara_delete_route '{}' --json samsara.samsara_list_addresses
List addresses.
read - Parameters
- none
kosmo integrations:call samsara.samsara_list_addresses '{}' --json kosmo integrations:samsara samsara_list_addresses '{}' --json samsara.samsara_get_address
Retrieve an address.
read - Parameters
- none
kosmo integrations:call samsara.samsara_get_address '{}' --json kosmo integrations:samsara samsara_get_address '{}' --json samsara.samsara_create_address
Create an address.
write - Parameters
- none
kosmo integrations:call samsara.samsara_create_address '{}' --json kosmo integrations:samsara samsara_create_address '{}' --json samsara.samsara_update_address
Update an address.
write - Parameters
- none
kosmo integrations:call samsara.samsara_update_address '{}' --json kosmo integrations:samsara samsara_update_address '{}' --json samsara.samsara_delete_address
Delete an address.
write - Parameters
- none
kosmo integrations:call samsara.samsara_delete_address '{}' --json kosmo integrations:samsara samsara_delete_address '{}' --json samsara.samsara_list_tags
List tags.
read - Parameters
- none
kosmo integrations:call samsara.samsara_list_tags '{}' --json kosmo integrations:samsara samsara_list_tags '{}' --json samsara.samsara_get_tag
Retrieve a tag.
read - Parameters
- none
kosmo integrations:call samsara.samsara_get_tag '{}' --json kosmo integrations:samsara samsara_get_tag '{}' --json samsara.samsara_create_tag
Create a tag.
write - Parameters
- none
kosmo integrations:call samsara.samsara_create_tag '{}' --json kosmo integrations:samsara samsara_create_tag '{}' --json samsara.samsara_update_tag
Update a tag.
write - Parameters
- none
kosmo integrations:call samsara.samsara_update_tag '{}' --json kosmo integrations:samsara samsara_update_tag '{}' --json samsara.samsara_delete_tag
Delete a tag.
write - Parameters
- none
kosmo integrations:call samsara.samsara_delete_tag '{}' --json kosmo integrations:samsara samsara_delete_tag '{}' --json samsara.samsara_list_users
List users.
read - Parameters
- none
kosmo integrations:call samsara.samsara_list_users '{}' --json kosmo integrations:samsara samsara_list_users '{}' --json samsara.samsara_get_user
Retrieve a user.
read - Parameters
- none
kosmo integrations:call samsara.samsara_get_user '{}' --json kosmo integrations:samsara samsara_get_user '{}' --json samsara.samsara_list_defects
List DVIR defects.
read - Parameters
- none
kosmo integrations:call samsara.samsara_list_defects '{}' --json kosmo integrations:samsara samsara_list_defects '{}' --json samsara.samsara_get_defects_history
Get historical DVIR defects.
read - Parameters
- none
kosmo integrations:call samsara.samsara_get_defects_history '{}' --json kosmo integrations:samsara samsara_get_defects_history '{}' --json samsara.samsara_list_defect_types
List defect types.
read - Parameters
- none
kosmo integrations:call samsara.samsara_list_defect_types '{}' --json kosmo integrations:samsara samsara_list_defect_types '{}' --json samsara.samsara_list_documents
List documents.
read - Parameters
- none
kosmo integrations:call samsara.samsara_list_documents '{}' --json kosmo integrations:samsara samsara_list_documents '{}' --json samsara.samsara_get_document
Retrieve a document.
read - Parameters
- none
kosmo integrations:call samsara.samsara_get_document '{}' --json kosmo integrations:samsara samsara_get_document '{}' --json samsara.samsara_create_document
Create a document.
write - Parameters
- none
kosmo integrations:call samsara.samsara_create_document '{}' --json kosmo integrations:samsara samsara_create_document '{}' --json samsara.samsara_list_document_types
List document types.
read - Parameters
- none
kosmo integrations:call samsara.samsara_list_document_types '{}' --json kosmo integrations:samsara samsara_list_document_types '{}' --json samsara.samsara_get_document_type
Retrieve a document type.
read - Parameters
- none
kosmo integrations:call samsara.samsara_get_document_type '{}' --json kosmo integrations:samsara samsara_get_document_type '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
samsara.samsara_list_vehicles 2 parameters
kosmo integrations:schema samsara.samsara_list_vehicles --json | Parameter | Type | Required | Description |
|---|---|---|---|
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 1 parameters
kosmo integrations:schema samsara.samsara_get_vehicle --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The Samsara vehicle ID (e.g., "123456789012345"). |
samsara.samsara_list_drivers 2 parameters
kosmo integrations:schema samsara.samsara_list_drivers --json | Parameter | Type | Required | Description |
|---|---|---|---|
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 1 parameters
kosmo integrations:schema samsara.samsara_get_driver --json | Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The Samsara driver ID (e.g., "123456789012345"). |
samsara.samsara_list_sensors 2 parameters
kosmo integrations:schema samsara.samsara_list_sensors --json | Parameter | Type | Required | Description |
|---|---|---|---|
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 0 parameters
kosmo integrations:schema samsara.samsara_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_api_get 0 parameters
kosmo integrations:schema samsara.samsara_api_get --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_api_post 0 parameters
kosmo integrations:schema samsara.samsara_api_post --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_api_patch 0 parameters
kosmo integrations:schema samsara.samsara_api_patch --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_api_delete 0 parameters
kosmo integrations:schema samsara.samsara_api_delete --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_get_vehicle_stats 0 parameters
kosmo integrations:schema samsara.samsara_get_vehicle_stats --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_get_vehicle_stats_history 0 parameters
kosmo integrations:schema samsara.samsara_get_vehicle_stats_history --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_get_vehicle_stats_feed 0 parameters
kosmo integrations:schema samsara.samsara_get_vehicle_stats_feed --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_list_trailers 0 parameters
kosmo integrations:schema samsara.samsara_list_trailers --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_get_trailer 0 parameters
kosmo integrations:schema samsara.samsara_get_trailer --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_create_trailer 0 parameters
kosmo integrations:schema samsara.samsara_create_trailer --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_update_trailer 0 parameters
kosmo integrations:schema samsara.samsara_update_trailer --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_delete_trailer 0 parameters
kosmo integrations:schema samsara.samsara_delete_trailer --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_get_trailer_stats 0 parameters
kosmo integrations:schema samsara.samsara_get_trailer_stats --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_get_trailer_stats_history 0 parameters
kosmo integrations:schema samsara.samsara_get_trailer_stats_history --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_get_trailer_stats_feed 0 parameters
kosmo integrations:schema samsara.samsara_get_trailer_stats_feed --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_list_equipment 0 parameters
kosmo integrations:schema samsara.samsara_list_equipment --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_get_equipment 0 parameters
kosmo integrations:schema samsara.samsara_get_equipment --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_get_equipment_stats 0 parameters
kosmo integrations:schema samsara.samsara_get_equipment_stats --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_get_equipment_stats_history 0 parameters
kosmo integrations:schema samsara.samsara_get_equipment_stats_history --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_get_equipment_stats_feed 0 parameters
kosmo integrations:schema samsara.samsara_get_equipment_stats_feed --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_list_routes 0 parameters
kosmo integrations:schema samsara.samsara_list_routes --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_get_route 0 parameters
kosmo integrations:schema samsara.samsara_get_route --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_create_route 0 parameters
kosmo integrations:schema samsara.samsara_create_route --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_update_route 0 parameters
kosmo integrations:schema samsara.samsara_update_route --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_delete_route 0 parameters
kosmo integrations:schema samsara.samsara_delete_route --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_list_addresses 0 parameters
kosmo integrations:schema samsara.samsara_list_addresses --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_get_address 0 parameters
kosmo integrations:schema samsara.samsara_get_address --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_create_address 0 parameters
kosmo integrations:schema samsara.samsara_create_address --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_update_address 0 parameters
kosmo integrations:schema samsara.samsara_update_address --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_delete_address 0 parameters
kosmo integrations:schema samsara.samsara_delete_address --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_list_tags 0 parameters
kosmo integrations:schema samsara.samsara_list_tags --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_get_tag 0 parameters
kosmo integrations:schema samsara.samsara_get_tag --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_create_tag 0 parameters
kosmo integrations:schema samsara.samsara_create_tag --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_update_tag 0 parameters
kosmo integrations:schema samsara.samsara_update_tag --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_delete_tag 0 parameters
kosmo integrations:schema samsara.samsara_delete_tag --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_list_users 0 parameters
kosmo integrations:schema samsara.samsara_list_users --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_get_user 0 parameters
kosmo integrations:schema samsara.samsara_get_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_list_defects 0 parameters
kosmo integrations:schema samsara.samsara_list_defects --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_get_defects_history 0 parameters
kosmo integrations:schema samsara.samsara_get_defects_history --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_list_defect_types 0 parameters
kosmo integrations:schema samsara.samsara_list_defect_types --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_list_documents 0 parameters
kosmo integrations:schema samsara.samsara_list_documents --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_get_document 0 parameters
kosmo integrations:schema samsara.samsara_get_document --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_create_document 0 parameters
kosmo integrations:schema samsara.samsara_create_document --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_list_document_types 0 parameters
kosmo integrations:schema samsara.samsara_list_document_types --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
samsara.samsara_get_document_type 0 parameters
kosmo integrations:schema samsara.samsara_get_document_type --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.