Skip to main content
Glama

vrchat_select_avatar

Switch to a specific avatar in VRChat by providing its unique ID. This tool enables avatar selection through the VRChat API.

Instructions

Select and switch to a specific avatar by its ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
avatarIdYesThe ID of the avatar to select

Implementation Reference

  • The asynchronous handler function that authenticates the VRChat client, selects the avatar by ID, and returns the response 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 }] } } }
  • Zod input schema defining the 'avatarId' parameter as a string.
    { avatarId: z.string().describe('The ID of the avatar to select'), },
  • Registers the 'vrchat_select_avatar' tool on the MCP server with name, description, input schema, and handler function.
    // 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 }] } } } )
  • src/main.ts:31-31 (registration)
    Calls createAvatarsTools during server initialization, which registers the vrchat_select_avatar tool among others.
    createAvatarsTools(server, vrchatClient)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sawa-zen/vrchat-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server