get-user
Retrieve current user profile information including timezone settings and group details from the Sunsama task management system.
Instructions
Get current user information including profile, timezone, and group details
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/user-tools.ts:4-15 (handler)Core handler implementation for the 'get-user' tool. Defines the tool configuration with name, description, schema, and execute function that fetches user data via injected client and formats as JSON response.export const getUserTool = withTransportClient({ name: "get-user", description: "Get current user information including profile, timezone, and group details", parameters: getUserSchema, execute: async (_args: GetUserInput, context: ToolContext) => { // Client auto-injected by withTransportClient const user = await context.client.getUser(); return formatJsonResponse(user); }, });
- src/schemas.ts:52-54 (schema)Zod schema defining input parameters for get-user tool (empty object since no parameters are required).// Get user parameters (no parameters needed) export const getUserSchema = z.object({});
- src/tools/user-tools.ts:17-17 (registration)Local registration of getUserTool in the userTools array, which is exported for inclusion in global tool list.export const userTools = [getUserTool];
- src/tools/index.ts:5-9 (registration)Global aggregation of all tools including userTools (containing get-user) into allTools, imported and registered in main.ts.export const allTools = [ ...userTools, ...taskTools, ...streamTools, ];
- src/tools/shared.ts:70-79 (helper)Helper function used by get-user handler to format the user data as MCP-compliant JSON text response.export function formatJsonResponse(data: any) { return { content: [ { type: "text", text: JSON.stringify(data, null, 2), }, ], }; }