vrchat_list_invite_messages
Retrieve a list of user invite messages in VRChat by specifying a valid user ID and message type. Requires admin credentials to access messages of other users.
Instructions
Returns a list of all the users Invite Messages. Admin Credentials are required to view messages of other users!
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| messageType | Yes | The type of message to fetch | |
| userId | Yes | Must be a valid user ID |
Implementation Reference
- src/tools/invites.ts:15-33 (handler)The handler function for the vrchat_list_invite_messages tool. It authenticates the VRChat client, fetches the invite messages using the inviteApi, and returns the response as JSON or an error message.async (params) => { try { await vrchatClient.auth() const response = await vrchatClient.inviteApi.getInviteMessages(params.userId, params.messageType) return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] } } catch (error) { return { content: [{ type: 'text', text: 'Failed to get invite messages: ' + error }] } } }
- src/tools/invites.ts:12-14 (schema)Input schema validation using Zod for userId (string) and messageType (enum).userId: z.string().min(1).describe('Must be a valid user ID'), messageType: z.enum(['message', 'response', 'request', 'requestResponse']).describe('The type of message to fetch') },
- src/tools/invites.ts:7-34 (registration)Direct registration of the tool using McpServer.tool method, including name, description, schema, and inline handler.// Name 'vrchat_list_invite_messages', // Description 'Returns a list of all the users Invite Messages. Admin Credentials are required to view messages of other users!', { userId: z.string().min(1).describe('Must be a valid user ID'), messageType: z.enum(['message', 'response', 'request', 'requestResponse']).describe('The type of message to fetch') }, async (params) => { try { await vrchatClient.auth() const response = await vrchatClient.inviteApi.getInviteMessages(params.userId, params.messageType) return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] } } catch (error) { return { content: [{ type: 'text', text: 'Failed to get invite messages: ' + error }] } } } )
- src/main.ts:36-36 (registration)Top-level call to createInvitesTools in the main server setup, which triggers the registration of the invites tools including vrchat_list_invite_messages.createInvitesTools(server, vrchatClient)