Skip to main content
Glama
sawa-zen

VRChat MCP Server

vrchat_list_favorites

Retrieve and filter your VRChat favorites list, including worlds, friends, and avatars, with options to specify quantity, type, and tags.

Instructions

Returns a list of favorites.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNoNumber of favorites to return (1-100). Default is 60.
offsetNoSkip this many favorites before beginning to return results.
typeNoFilter by favorite type ("world", "friend", or "avatar").
tagNoFilter by tag (e.g., "group_0", "group_1").

Implementation Reference

  • Handler function for the 'vrchat_list_favorites' tool. Authenticates the VRChat client, fetches favorites using the favoritesApi, and returns the data as a JSON string in a text content block. Handles errors by returning an error message.
      async (params) => {
        try {
          await vrchatClient.auth()
          const favorites = await vrchatClient.favoritesApi.getFavorites(
            params.n,
            params.offset,
            params.type,
            params.tag,
          )
          return {
            content: [{
              type: 'text',
              text: JSON.stringify(favorites.data, null, 2)
            }]
          }
        } catch (error) {
          return {
            content: [{
              type: 'text',
              text: 'Failed to list favorites: ' + error
            }]
          }
        }
      }
    )
  • Zod input schema defining parameters for the 'vrchat_list_favorites' tool: n (count), offset, type (world/friend/avatar), and tag.
    {
      n: z.number().min(1).max(100).optional().default(60)
        .describe('Number of favorites to return (1-100). Default is 60.'),
      offset: z.number().min(0).optional()
        .describe('Skip this many favorites before beginning to return results.'),
      type: z.string().optional()
        .describe('Filter by favorite type ("world", "friend", or "avatar").'),
      tag: z.string().optional()
        .describe('Filter by tag (e.g., "group_0", "group_1").'),
    },
  • MCP server.tool registration for 'vrchat_list_favorites', including name, description, input schema, and handler function.
      // Name
      'vrchat_list_favorites',
      // Description
      'Returns a list of favorites.',
      {
        n: z.number().min(1).max(100).optional().default(60)
          .describe('Number of favorites to return (1-100). Default is 60.'),
        offset: z.number().min(0).optional()
          .describe('Skip this many favorites before beginning to return results.'),
        type: z.string().optional()
          .describe('Filter by favorite type ("world", "friend", or "avatar").'),
        tag: z.string().optional()
          .describe('Filter by tag (e.g., "group_0", "group_1").'),
      },
      async (params) => {
        try {
          await vrchatClient.auth()
          const favorites = await vrchatClient.favoritesApi.getFavorites(
            params.n,
            params.offset,
            params.type,
            params.tag,
          )
          return {
            content: [{
              type: 'text',
              text: JSON.stringify(favorites.data, null, 2)
            }]
          }
        } catch (error) {
          return {
            content: [{
              type: 'text',
              text: 'Failed to list favorites: ' + error
            }]
          }
        }
      }
    )
  • src/main.ts:35-35 (registration)
    Invocation of createFavoritesTools in the main MCP server setup, which registers the 'vrchat_list_favorites' tool among others.
    createFavoritesTools(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