get_user_info
Retrieve your Money Lover user profile using your authentication token to access personal account information for financial management.
Instructions
Retrieve the Money Lover user profile associated with the provided token.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | No | JWT token returned by the login tool or derived from EMAIL/PASSWORD environment variables |
Implementation Reference
- src/server.js:330-337 (handler)Handler function that resolves the authentication token and executes client.getUserInfo() to retrieve user profile.async ({ token }) => { try { const data = await runWithClient(token, client => client.getUserInfo()); return formatSuccess(data ?? {}); } catch (error) { return formatError(error instanceof Error ? error : new Error(String(error))); } }
- src/server.js:325-329 (schema)Input schema definition for the get_user_info tool, using the shared tokenArgument.{ title: 'Get User Info', description: 'Retrieve the Money Lover user profile associated with the provided token.', inputSchema: tokenArgument },
- src/server.js:323-339 (registration)Registration of the 'get_user_info' MCP tool with schema and inline handler function.server.registerTool( 'get_user_info', { title: 'Get User Info', description: 'Retrieve the Money Lover user profile associated with the provided token.', inputSchema: tokenArgument }, async ({ token }) => { try { const data = await runWithClient(token, client => client.getUserInfo()); return formatSuccess(data ?? {}); } catch (error) { return formatError(error instanceof Error ? error : new Error(String(error))); } } );
- src/moneyloverClient.js:118-120 (helper)Core implementation in MoneyloverClient that performs the API POST request to /user/info endpoint.async getUserInfo() { return this.#post('/user/info'); }
- src/server.js:271-272 (helper)Utility function used by the handler to create a client instance with resolved token and execute the provided function.const runWithClient = (token, fn) => runWithResolvedToken(token, resolvedToken => withClient(resolvedToken, fn));