vrchat_list_favorites
Retrieve a filtered list of VRChat favorites, including worlds, friends, and avatars, with options to set limits, offsets, and tags for precise results.
Instructions
Returns a list of favorites.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | Number of favorites to return (1-100). Default is 60. | |
| offset | No | Skip this many favorites before beginning to return results. | |
| tag | No | Filter by tag (e.g., "group_0", "group_1"). | |
| type | No | Filter by favorite type ("world", "friend", or "avatar"). |
Implementation Reference
- src/tools/favorites.ts:57-79 (handler)The handler function that executes the tool: authenticates VRChat client, calls getFavorites API with params, returns JSON data or error.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/tools/favorites.ts:47-56 (schema)Zod input schema defining parameters for the tool: n (count), offset, type, 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").'), },
- src/tools/favorites.ts:43-81 (registration)Tool registration call with server.tool, specifying 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 }] } } } )