vrchat_list_favorite_groups
Retrieve a list of favorite VRChat groups owned by a user. Specify the number of groups, apply pagination with offset, or filter by owner ID to get targeted results.
Instructions
Returns a list of favorite groups owned by a user.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | Number of favorite groups to return (1-100). Default is 60. | |
| offset | No | Skip this many favorite groups before beginning to return results. | |
| ownerId | No | Filter by owner ID. If not provided, returns current user's favorite groups. |
Implementation Reference
- src/tools/favorites.ts:17-39 (handler)The async handler function that authenticates the VRChat client, calls getFavoriteGroups on favoritesApi with parameters n, offset, ownerId, and returns JSON-stringified data or an error message.async (params) => { try { await vrchatClient.auth() const favorites = await vrchatClient.favoritesApi.getFavoriteGroups( params.n, params.offset, params.ownerId, ) return { content: [{ type: 'text', text: JSON.stringify(favorites.data, null, 2) }] } } catch (error) { return { content: [{ type: 'text', text: 'Failed to list favorite groups: ' + error }] } } }
- src/tools/favorites.ts:9-16 (schema)Zod input schema for the tool parameters: n (optional number 1-100, default 60), offset (optional number >=0), ownerId (optional string).{ n: z.number().min(1).max(100).optional().default(60) .describe('Number of favorite groups to return (1-100). Default is 60.'), offset: z.number().min(0).optional() .describe('Skip this many favorite groups before beginning to return results.'), ownerId: z.string().optional() .describe('Filter by owner ID. If not provided, returns current user\'s favorite groups.'), },
- src/tools/favorites.ts:6-40 (registration)Tool registration via server.tool() call, including name, description, input schema, and handler function.server.tool( 'vrchat_list_favorite_groups', 'Returns a list of favorite groups owned by a user.', { n: z.number().min(1).max(100).optional().default(60) .describe('Number of favorite groups to return (1-100). Default is 60.'), offset: z.number().min(0).optional() .describe('Skip this many favorite groups before beginning to return results.'), ownerId: z.string().optional() .describe('Filter by owner ID. If not provided, returns current user\'s favorite groups.'), }, async (params) => { try { await vrchatClient.auth() const favorites = await vrchatClient.favoritesApi.getFavoriteGroups( params.n, params.offset, params.ownerId, ) return { content: [{ type: 'text', text: JSON.stringify(favorites.data, null, 2) }] } } catch (error) { return { content: [{ type: 'text', text: 'Failed to list favorite groups: ' + error }] } } } )
- src/main.ts:35-35 (registration)Invocation of createFavoritesTools(server, vrchatClient) which registers the vrchat_list_favorite_groups tool among others.createFavoritesTools(server, vrchatClient)