vrchat_get_current_user
Retrieve your VRChat user information to access your profile details through the VRChat MCP Server.
Instructions
Retrieve your own VRChat user information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/users.ts:9-28 (handler)The handler function for the 'vrchat_get_current_user' tool. It authenticates the VRChat client, fetches the current user data via the API, and returns it as a JSON-formatted text block. Includes error handling.async () => { try { await vrchatClient.auth() const response = await vrchatClient.authApi.getCurrentUser() const user = response.data return { content: [{ type: 'text', text: JSON.stringify(user, null, 2) }] } } catch (error) { return { content: [{ type: 'text', text: 'Failed to retrieve user: ' + error }] } } }
- src/tools/users.ts:5-29 (registration)Direct registration of the 'vrchat_get_current_user' tool with the MCP server inside the createUsersTools function, including name, description, empty input schema, and inline handler.server.tool( 'vrchat_get_current_user', 'Retrieve your own VRChat user information', {}, // No parameters async () => { try { await vrchatClient.auth() const response = await vrchatClient.authApi.getCurrentUser() const user = response.data return { content: [{ type: 'text', text: JSON.stringify(user, null, 2) }] } } catch (error) { return { content: [{ type: 'text', text: 'Failed to retrieve user: ' + error }] } } } )
- src/main.ts:29-29 (registration)Invocation of createUsersTools in the main server setup, which registers the users tools including 'vrchat_get_current_user'.createUsersTools(server, vrchatClient)