vrchat_select_avatar
Switch to a specific avatar in VRChat by entering its unique ID. This tool simplifies avatar selection through the VRChat MCP Server for streamlined user interactions.
Instructions
Select and switch to a specific avatar by its ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| avatarId | Yes | The ID of the avatar to select |
Implementation Reference
- src/tools/avatars.ts:14-32 (handler)Handler function that authenticates with VRChat, selects the avatar by ID using the VRChatClient API, and returns the response as JSON or an error message.async (params) => { try { await vrchatClient.auth() const response = await vrchatClient.avatarApi.selectAvatar(params.avatarId) return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] } } catch (error) { return { content: [{ type: 'text', text: 'Failed to select avatar: ' + error }] } } }
- src/tools/avatars.ts:11-13 (schema)Input schema defining the 'avatarId' parameter as a string using Zod.{ avatarId: z.string().describe('The ID of the avatar to select'), },
- src/tools/avatars.ts:6-33 (registration)Tool registration call using McpServer.tool() with name 'vrchat_select_avatar', description, input schema, and handler function.server.tool( // Name 'vrchat_select_avatar', // Description 'Select and switch to a specific avatar by its ID.', { avatarId: z.string().describe('The ID of the avatar to select'), }, async (params) => { try { await vrchatClient.auth() const response = await vrchatClient.avatarApi.selectAvatar(params.avatarId) return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] } } catch (error) { return { content: [{ type: 'text', text: 'Failed to select avatar: ' + error }] } } } )