Skip to main content
Glama

get_avatar_list

Retrieve a list of available avatars in VRChat via the Model Context Protocol, enabling AI-assisted avatar selection and control in virtual environments.

Instructions

Get a list of available avatars.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool registration and inline handler for 'get_avatar_list'. Fetches avatars via avatarTools.getAllAvatars() and returns JSON string.
    server.tool( 'get_avatar_list', 'Get a list of available avatars.', {}, async (_, extra) => { try { const ctx = createToolContext(extra); const avatars = await avatarTools.getAllAvatars(); return { content: [{ type: 'text', text: JSON.stringify(avatars) }] }; } catch (error) { return { content: [{ type: 'text', text: `Error getting avatar list: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } } );
  • Helper method getAllAvatars() in AvatarTools class that calls wsClient.getAvatarlist() to fetch the avatar list with logging and error handling.
    /** * Get a list of all available avatars. * * @param ctx - MCP Context (optional) * @returns Promise resolving to an object with avatar IDs as keys and names as values */ public async getAllAvatars(ctx?: ToolContext): Promise<{ [avatarId: string]: string }> { if (ctx) { await ctx.info('Getting list of available avatars'); } try { const avatars = await this.wsClient.getAvatarlist(); if (ctx) { const avatarCount = Object.keys(avatars).length; await ctx.info(`Found ${avatarCount} available avatars`); } return avatars; } catch (error) { const errorMsg = `Error getting avatar list: ${error instanceof Error ? error.message : String(error)}`; this.logger.error(errorMsg); if (ctx) { await ctx.error(errorMsg); } return {}; } }

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/Krekun/vrchat-mcp-osc'

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