KosmoKrator

productivity

Toggl Track CLI for AI Agents

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

7 functions 6 read 1 write API token auth

Toggl Track CLI Setup

Toggl Track can be configured headlessly with `kosmokrator integrations:configure toggl-track`.

# 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 toggl-track --set api_token="$TOGGL_TRACK_API_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor toggl-track --json
kosmokrator integrations:status --json

Credentials

Authentication type: API token api_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_token TOGGL_TRACK_API_TOKEN Secret secret yes API Token
url TOGGL_TRACK_URL URL url no API Base URL

Call Toggl Track Headlessly

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

kosmo integrations:call toggl-track.toggl_list_time_entries '{
  "start_date": "example_start_date",
  "end_date": "example_end_date",
  "workspace_id": 1,
  "project_id": 1,
  "limit": 1
}' --json

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

kosmo integrations:toggl-track toggl_list_time_entries '{
  "start_date": "example_start_date",
  "end_date": "example_end_date",
  "workspace_id": 1,
  "project_id": 1,
  "limit": 1
}' --json

Agent Discovery Commands

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

kosmo integrations:docs toggl-track --json
kosmo integrations:docs toggl-track.toggl_list_time_entries --json
kosmo integrations:schema toggl-track.toggl_list_time_entries --json
kosmo integrations:search "Toggl Track" --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 Toggl Track.

toggl-track.toggl_list_time_entries

Read read

List time entries from Toggl Track. Filter by date range, workspace, or project. Returns recent time entries by default.

Parameters
start_date, end_date, workspace_id, project_id, limit

Generic CLI call

kosmo integrations:call toggl-track.toggl_list_time_entries '{"start_date":"example_start_date","end_date":"example_end_date","workspace_id":1,"project_id":1,"limit":1}' --json

Provider shortcut

kosmo integrations:toggl-track toggl_list_time_entries '{"start_date":"example_start_date","end_date":"example_end_date","workspace_id":1,"project_id":1,"limit":1}' --json

toggl-track.toggl_get_time_entry

Read read

Get detailed information about a specific Toggl Track time entry by its ID.

Parameters
id

Generic CLI call

kosmo integrations:call toggl-track.toggl_get_time_entry '{"id":1}' --json

Provider shortcut

kosmo integrations:toggl-track toggl_get_time_entry '{"id":1}' --json

toggl-track.toggl_create_time_entry

Write write

Create a new time entry in Toggl Track. Provide a description, workspace, start time, and duration. Optionally assign to a project, add tags, or mark as billable.

Parameters
workspace_id, description, duration, start, pid, tags, billable, created_with

Generic CLI call

kosmo integrations:call toggl-track.toggl_create_time_entry '{"workspace_id":1,"description":"example_description","duration":1,"start":"example_start","pid":1,"tags":"example_tags","billable":true,"created_with":"example_created_with"}' --json

Provider shortcut

kosmo integrations:toggl-track toggl_create_time_entry '{"workspace_id":1,"description":"example_description","duration":1,"start":"example_start","pid":1,"tags":"example_tags","billable":true,"created_with":"example_created_with"}' --json

toggl-track.toggl_list_projects

Read read

List projects from Toggl Track. Optionally filter by workspace or active status.

Parameters
active, workspace_id

Generic CLI call

kosmo integrations:call toggl-track.toggl_list_projects '{"active":true,"workspace_id":1}' --json

Provider shortcut

kosmo integrations:toggl-track toggl_list_projects '{"active":true,"workspace_id":1}' --json

toggl-track.toggl_get_project

Read read

Get detailed information about a specific Toggl Track project by its ID.

Parameters
id

Generic CLI call

kosmo integrations:call toggl-track.toggl_get_project '{"id":1}' --json

Provider shortcut

kosmo integrations:toggl-track toggl_get_project '{"id":1}' --json

toggl-track.toggl_list_workspaces

Read read

List all Toggl Track workspaces accessible to the authenticated user. Returns workspace IDs and names needed for other operations.

Parameters
none

Generic CLI call

kosmo integrations:call toggl-track.toggl_list_workspaces '{}' --json

Provider shortcut

kosmo integrations:toggl-track toggl_list_workspaces '{}' --json

toggl-track.toggl_get_current_user

Read read

Get the authenticated Toggl Track user profile, including email, name, default workspace, and time zone.

Parameters
none

Generic CLI call

kosmo integrations:call toggl-track.toggl_get_current_user '{}' --json

Provider shortcut

kosmo integrations:toggl-track toggl_get_current_user '{}' --json

Function Schemas

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

toggl-track.toggl_list_time_entries

List time entries from Toggl Track. Filter by date range, workspace, or project. Returns recent time entries by default.

Operation
Read read
Schema command
kosmo integrations:schema toggl-track.toggl_list_time_entries --json
ParameterTypeRequiredDescription
start_date string no Start date for the range (ISO 8601, e.g., "2025-01-01T00:00:00Z").
end_date string no End date for the range (ISO 8601, e.g., "2025-01-31T23:59:59Z").
workspace_id integer no Filter by workspace ID.
project_id integer no Filter by project ID.
limit integer no Maximum number of time entries to return.

toggl-track.toggl_get_time_entry

Get detailed information about a specific Toggl Track time entry by its ID.

Operation
Read read
Schema command
kosmo integrations:schema toggl-track.toggl_get_time_entry --json
ParameterTypeRequiredDescription
id integer yes The time entry ID.

toggl-track.toggl_create_time_entry

Create a new time entry in Toggl Track. Provide a description, workspace, start time, and duration. Optionally assign to a project, add tags, or mark as billable.

Operation
Write write
Schema command
kosmo integrations:schema toggl-track.toggl_create_time_entry --json
ParameterTypeRequiredDescription
workspace_id integer yes The workspace ID where the time entry will be created.
description string no Description of the time entry (e.g., "Writing documentation").
duration integer no Duration in seconds. Use a negative value (e.g., -1) to start a running timer.
start string no Start time in ISO 8601 format (e.g., "2025-01-15T09:00:00Z"). Required for completed entries.
pid integer no Project ID to assign the time entry to.
tags array no List of tag names to apply (e.g., ["billing", "client-work"]).
billable boolean no Whether the time entry is billable (default: false).
created_with string no Name of the application that created the entry (default: "OpenCompany").

toggl-track.toggl_list_projects

List projects from Toggl Track. Optionally filter by workspace or active status.

Operation
Read read
Schema command
kosmo integrations:schema toggl-track.toggl_list_projects --json
ParameterTypeRequiredDescription
active boolean no Filter by active status. true for active projects only, false for archived.
workspace_id integer no Filter by workspace ID.

toggl-track.toggl_get_project

Get detailed information about a specific Toggl Track project by its ID.

Operation
Read read
Schema command
kosmo integrations:schema toggl-track.toggl_get_project --json
ParameterTypeRequiredDescription
id integer yes The project ID.

toggl-track.toggl_list_workspaces

List all Toggl Track workspaces accessible to the authenticated user. Returns workspace IDs and names needed for other operations.

Operation
Read read
Schema command
kosmo integrations:schema toggl-track.toggl_list_workspaces --json
ParameterTypeRequiredDescription
No parameters.

toggl-track.toggl_get_current_user

Get the authenticated Toggl Track user profile, including email, name, default workspace, and time zone.

Operation
Read read
Schema command
kosmo integrations:schema toggl-track.toggl_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.