get_user
Retrieve profile details for Codebeamer users by numeric ID to identify assignees and creators in item fields.
Instructions
Get profile details for a Codebeamer user by their numeric ID. User IDs appear in item fields like assignedTo and createdBy.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | Numeric user ID |
Implementation Reference
- src/tools/users.ts:21-24 (handler)The tool handler for 'get_user', which calls the Codebeamer client to fetch the user and formats the result.
async ({ userId }) => { const user = await client.getUser(userId); return { content: [{ type: "text", text: formatUser(user) }] }; }, - src/tools/users.ts:10-20 (registration)The tool registration for 'get_user' including its schema definition.
server.registerTool( "get_user", { title: "Get User", description: "Get profile details for a Codebeamer user by their numeric ID. " + "User IDs appear in item fields like assignedTo and createdBy.", inputSchema: { userId: z.number().int().positive().describe("Numeric user ID"), }, }, - The client method used by the handler to fetch the user data.
getUser(id: number): Promise<CbUser> { return this.http.get(`/users/${id}`, { resource: `user ${id}` }); }