toggl_list_workspaces
Retrieve all available workspaces from Toggl Track to manage time tracking projects and organize team collaboration.
Instructions
List all available workspaces
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:703-720 (handler)Handler for the toggl_list_workspaces tool. Fetches workspaces using TogglAPI and returns formatted JSON list.case 'toggl_list_workspaces': { const workspaces = await api.getWorkspaces(); return { content: [{ type: 'text', text: JSON.stringify({ count: workspaces.length, workspaces: workspaces.map(ws => ({ id: ws.id, name: ws.name, premium: ws.premium, default_currency: ws.default_currency })) }, null, 2) }] }; }
- src/index.ts:316-322 (schema)Input schema definition for toggl_list_workspaces tool (no parameters required).name: 'toggl_list_workspaces', description: 'List all available workspaces', inputSchema: { type: 'object', properties: {}, required: [] },
- src/index.ts:386-388 (registration)Registration of all tools including toggl_list_workspaces via the ListToolsRequestSchema handler.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });