get_user
Retrieve a user's details by email on the TeamRetro MCP Server, enabling seamless integration with TeamRetro.com's API for efficient team retrospective management.
Instructions
Get a single user by email
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | string |
Implementation Reference
- src/features/users/tools.ts:67-74 (handler)The core handler implementation for the 'get_user' MCP tool. It defines the input schema (email), description, and the async handler function that calls the usersService.getUser method.get_user: { schema: z.object({ email: emailSchema, }), description: "Retrieve detailed information about a single user by their email address", handler: async (args: { email: string }) => createToolResponse(usersService.getUser(args.email)), },
- src/tools.ts:10-22 (registration)Registers the userTools (including get_user) by importing and spreading into the central tools object.import { userTools } from './features/users/tools.js'; import { toolErrorHandlers } from './utils/tools.js'; const tools = { ...userTools, ...teamTools, ...teamMembersTools, ...actionTools, ...retrospectiveTools, ...agreementTools, ...healthModelTools, ...healthCheckTools, };
- src/index.ts:43-63 (registration)Final MCP server registration: sets up request handlers for listing tools (using toolSchema) and calling tools (using toolHandlers[name] for execution).private setupTools(): void { // List available tools this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: toolSchema, })); // Handle tool calls this.server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args = {} } = request.params; const handler = toolHandlers[name]; if (!handler) { throw new McpError(ErrorCode.MethodNotFound, `Tool not found: ${name}`); } const response = await handler(args); logger.info(`${name} Tool response:`, { response }); return response; }); }
- src/features/users/service.ts:66-68 (helper)The underlying service method invoked by the tool handler, performing an API GET request to fetch the user by email.async getUser(email: string): Promise<SingleApiResponse<User>> { return this.get<SingleApiResponse<User>>(`/v1/users/${email}`); }