vrchat_get_current_user
Retrieve your own VRChat user information directly through the MCP Server, enabling easy access to your profile data via a standardized API interface.
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 that authenticates the VRChat client, fetches the current user information using the VRChat API, and returns the user data as a formatted JSON string or an error message if the request fails.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)Registers the 'vrchat_get_current_user' tool with the MCP server, including name, description, empty input schema, and the handler function.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/tools/users.ts:8-8 (schema)Defines the input schema for the tool, which is empty indicating no parameters are required.{}, // No parameters
- src/main.ts:29-29 (registration)Invokes createUsersTools to register the users tools, including 'vrchat_get_current_user', on the MCP server instance.createUsersTools(server, vrchatClient)