KosmoKrator

field-service

ServiceM8 CLI for Headless Automation

Use the ServiceM8 CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.

7 functions 6 read 1 write Manual OAuth token auth

ServiceM8 CLI for Headless Automation

Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.

Use headless automation when another tool needs a stable local command surface. The ServiceM8 CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# ServiceM8 CLI for Headless Automation
kosmokrator integrations:configure service_m8 --set access_token="$SERVICE_M8_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call service_m8.servicem8_list_jobs '{"status":"example_status","limit":1,"offset":1}' --json

Discovery Before Execution

Agents and scripts can inspect ServiceM8 docs and schemas before choosing a function.

kosmo integrations:docs service_m8 --json
kosmo integrations:docs service_m8.servicem8_list_jobs --json
kosmo integrations:schema service_m8.servicem8_list_jobs --json
kosmo integrations:search "ServiceM8" --json
kosmo integrations:list --json

Useful ServiceM8 CLI Functions

FunctionTypeParametersDescription
service_m8.servicem8_list_jobs Read status, limit, offset List jobs from ServiceM8. Returns job details including status, client, dates, and descriptions. Supports filtering by status and pagination.
service_m8.servicem8_get_job Read uuid Get detailed information about a specific ServiceM8 job by its UUID. Returns full job details including status, client, description, dates, and assigned staff.
service_m8.servicem8_list_clients Read limit, offset List clients from ServiceM8. Returns client details including name, email, phone, and address. Supports pagination.
service_m8.servicem8_get_client Read uuid Get detailed information about a specific ServiceM8 client by their UUID. Returns client details including name, email, phone, billing address, and notes.
service_m8.servicem8_create_job Write client_id, template_id, description Create a new job in ServiceM8. Requires a client UUID. Optionally specify a job template and description to pre-populate the job.
service_m8.servicem8_list_activities Read job_uuid, limit, offset List activity records from ServiceM8. Returns a timeline of events such as job status changes, comments, and notes. Supports filtering by job and pagination.
service_m8.servicem8_get_current_user Read none Get the profile of the currently authenticated ServiceM8 user. Returns name, email, role, and account details.

Automation Notes

Related ServiceM8 CLI Pages