feat(toggl): add workspace user reporting - #57
Merged
jack-arturo merged 2 commits intoJun 8, 2026
Merged
Conversation
Refreshes PR #46 on top of feat/self-host-streamable-http. Adds privacy-safe workspace user lookup and optional uid report filtering through Toggl Reports API v3. Co-authored-by: Vincent Ardern <vincent@charityaccounts.co.nz>
4 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Adds privacy-safe workspace member listing and enables optional per-user report filtering by uid via Toggl Reports API v3, while keeping existing “authenticated user” report behavior unchanged when uid is omitted.
Changes:
- Introduces
toggl_list_workspace_users(returns onlyuid,name,active) to support team reporting without leaking private fields. - Extends daily/weekly/project/workspace report tools with optional
uid+workspace_idto fetch another member’s entries via Reports API v3. - Refactors Toggl API calls to share retry logic and adds/extends tests covering the new endpoints and pagination behavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/toggl-api.test.ts | Expands TogglAPI unit coverage (workspace users, Reports API pagination, 5xx retries) and enhances the response mock to support custom headers. |
| tests/mcp-server.test.ts | Adds MCP-level tests for the new tool schema and verifies privacy-safe output + report filtering behavior. |
| src/types.ts | Adds WorkspaceUser (raw API shape) and WorkspaceMemberSummary (privacy-safe shape). |
| src/toggl-api.ts | Adds workspace user fetch + mapping, Reports API request helper, and per-user time entry retrieval with pagination/flattening. |
| src/index.ts | Adds new MCP tool definition and wires uid-based branching into report handlers. |
| server.json | Registers the new toggl_list_workspace_users tool in the published tool list. |
| README.md | Documents team reporting, the new tool, and uid filtering support across report tools. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
toggl_list_workspace_usersusing documentedGET /workspaces/{id}/users, returning onlyuid,name, andactiveuidreport filtering through Toggl Reports API v3 for daily, weekly, project summary, and workspace summary toolsuidis omittedBreaking Changes
None.
Related
feat/self-host-streamable-httpVerification
npm run buildnpm testnpm run test:coveragenpm run lint(exits 0 with existing no-explicit-any warnings)npm audit --audit-level=high(exits 0; existing moderate brace-expansion advisory remains)Co-authored-by: Vincent Ardern vincent@charityaccounts.co.nz