Add team get to resolve a member's roles by name, email, or id - #29
Merged
Conversation
team search goes through /api/team/typeahead, which carries no role
field, so answering "which role does this person have" meant reading it
out of the UI by hand. team get resolves a member by UUID, or by a
case-insensitive name/email match, and names their roles by
cross-referencing /api/team/{id} against /api/role — the retrieve
endpoint returns bare role UUIDs rather than expanded objects.
The name/email resolver is shared with the webhook sample tool's
lookup, which previously carried its own copy.
annaliu-kizen
approved these changes
Sep 4, 2026
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.
Problem
person -> role -> group -> controlis the chain you walk to answer "why can this person see that?", and the CLI could not take the first step. The only team-member lookup,team search, goes through/api/team/typeahead, which carries no role field at all — so answering "which role does this person have" meant reading it out of the Kizen UI by hand.Solution
kizen team get <id|name|email>resolves a team member and names their roles.Resolution accepts a UUID directly, or a case-insensitive name/email match against
team search, falling back to the single result when nothing matches exactly. Roles are named by cross-referencingGET /api/team/{id}againstGET /api/role— the retrieve endpoint returns bare role UUIDs rather than expanded objects, confirmed live.team search's existing output is unchanged.Testing
bin/check.sh— all five steps pass:1442 passed, 4 skipped(+12).The live drift tier was run against a disposable environment with this branch in the stack — identical results to
main.Design notes / tradeoffs
The name/email resolver is now shared with the webhook sample tool, which carried its own near-identical copy. Both call
tools.team.team_member_candidates; the extracted default (limit=25) matches what the API layer already used, so neither caller changes behaviour.The "fall back to the single result" rule is worth pushing on: it makes
team get "jo"work when exactly one person matches, but means a typo that happens to match one person resolves silently rather than erroring. The alternative — exact-or-nothing — was rejected as too strict for a lookup command, but it is a judgement call.Fourth of six stacked branches.