vrchat_list_favorite_groups
Retrieve a list of favorite groups owned by a VRChat user. Specify the number of groups, offset, or owner ID to filter results using the VRChat MCP Server.
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 handler function authenticates the VRChat client, retrieves the list of favorite groups using the favoritesApi.getFavoriteGroups method with parameters n, offset, and ownerId, formats the response as JSON, and handles errors by returning 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:10-16 (schema)Zod input schema defining optional parameters: n (number, 1-100, default 60), offset (number >=0), ownerId (string). Includes descriptions for each.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)Registration of the 'vrchat_list_favorite_groups' tool using server.tool(), providing name, description, input schema, and inline handler function within the createFavoritesTools exporter.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 }] } } } )