get_user_info
Retrieve current user details from FreshRSS instances to access account information and manage RSS feed subscriptions.
Instructions
Get current user information
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/handlers/stats-handlers.ts:52-62 (handler)The actual handler function that executes the tool logic for 'get_user_info'.
wrapTool('get_user_info', async () => { const info = await client.stats.getUserInfo(); const lines = [ `**User ID:** ${info.userId}`, `**Username:** ${info.userName}`, info.userEmail !== undefined && info.userEmail !== '' ? `**Email:** ${info.userEmail}` : '', ].filter((line) => line !== ''); return textResult(lines.join('\n')); }) - src/handlers/stats-handlers.ts:46-63 (registration)Registration of the 'get_user_info' tool within the MCP server.
server.registerTool( 'get_user_info', { description: 'Get current user information', inputSchema: z.object({}).strict(), }, wrapTool('get_user_info', async () => { const info = await client.stats.getUserInfo(); const lines = [ `**User ID:** ${info.userId}`, `**Username:** ${info.userName}`, info.userEmail !== undefined && info.userEmail !== '' ? `**Email:** ${info.userEmail}` : '', ].filter((line) => line !== ''); return textResult(lines.join('\n')); }) ); - src/api/stats-service.ts:24-26 (helper)The underlying service method that makes the API request for 'getUserInfo'.
async getUserInfo(): Promise<UserInfo> { return this.http.get<UserInfo>('/reader/api/0/user-info'); }