feat(users): list active staff via user list --staff and list_staff MCP tool - #89
Merged
Merged
Conversation
…ff MCP tool Adds StaffDirectory, the roster a missing-timesheet check runs against: active employees minus uncategorised, O, OA-E, EXCON and WE accounts, and retired accounts renamed with a zz prefix. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
cc: —
Related PBI: none
TL;DR
An agent can't find who is missing timesheets, because no MCP tool lists employees. And the raw active list is noisy: on the production tenant, 115 "active" accounts are only 52 real staff.
This PR adds
tp user list --staffand a matchinglist_staffMCP tool that return just the people expected to log time. Pair it withcheck_weekto replace the old SSRS "missing timesheets" report.How
StaffDirectory.ListAsync(start here) is shared by both surfaces. It takes the active dropdown and drops:zz: retired accounts that were renamed instead of end-datedO,OA-E,EXCON,WE: office/admin, contractors, work experienceReviewer notes
GetByIdsreturns a category, so it reads/api/employees/{empId}for each candidate, 8 at a time.zzaccounts are dropped before these reads.Tests
StaffDirectoryTestscovers each exclusion rule and checks thatzzaccounts get no detail read.tp user list --staff --limit 0 --json→ 52 rowslist_staffovertp mcpstdio → 52 rowsssw-staging.Changes made by Claude Opus 5.5 via Claude Code.
🤖 Generated with Claude Code