productivity
Toggl CLI for Coding Agents
Use the Toggl CLI for coding agents with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 6 read 1 write API token auth
Toggl CLI for Coding Agents
Let coding agents discover schemas and execute integration functions through CLI commands or MCP.
Use this pattern when another coding agent needs exact commands and schema discovery. The Toggl CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Toggl CLI for Coding Agents
kosmokrator integrations:configure toggl --set api_token="$TOGGL_API_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call toggl.toggl_create_time_entry '{"workspace_id":"example_workspace_id","description":"example_description","start":"example_start","stop":"example_stop","duration":1,"project_id":"example_project_id","tags":"example_tags"}' --json Discovery Before Execution
Agents and scripts can inspect Toggl docs and schemas before choosing a function.
kosmo integrations:docs toggl --json
kosmo integrations:docs toggl.toggl_create_time_entry --json
kosmo integrations:schema toggl.toggl_create_time_entry --json
kosmo integrations:search "Toggl" --json
kosmo integrations:list --json Useful Toggl CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
toggl.toggl_create_time_entry | Write | workspace_id, description, start, stop, duration, project_id, tags | Create a new time entry in a Toggl workspace. Provide a description, start time, and optionally a project and stop time. |
toggl.toggl_get_current_user | Read | none | Get the authenticated Toggl user profile. Use this to verify your API token is working. |
toggl.toggl_get_project | Read | workspace_id, project_id | Get details for a single Toggl project by ID. |
toggl.toggl_get_time_entry | Read | time_entry_id | Get details for a single Toggl time entry by ID. |
toggl.toggl_list_projects | Read | workspace_id, active | List projects in a Toggl workspace. Optionally filter for active projects only. |
toggl.toggl_list_time_entries | Read | start_date, end_date | List recent Toggl time entries. Optionally filter by date range. |
toggl.toggl_list_workspaces | Read | none | List all Toggl workspaces the authenticated user belongs to. Returns workspace IDs and names needed for other Toggl tools. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.