vrchat_get_invite_message
Retrieve specific invite messages from VRChat users, including normal invites, responses, requests, and request replies, using admin credentials to access other users' messages.
Instructions
Returns a specific invite message. Admin Credentials are required to view messages of other users!
Message type refers to a different collection of messages:
- message = Message during a normal invite
- response = Message when replying to a message
- request = Message when requesting an invite
- requestResponse = Message when replying to a request for invite
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | Must be a valid user ID. | |
| messageType | No | The type of message to fetch. Must be a valid InviteMessageType. | message |
| slot | Yes | Slot number of the message to fetch. |
Implementation Reference
- src/tools/invites.ts:93-115 (handler)Handler function that authenticates the VRChat client, calls inviteApi.getInviteMessage with userId, messageType, and slot, and returns the JSON response or an error message.async (params) => { try { await vrchatClient.auth() const response = await vrchatClient.inviteApi.getInviteMessage( params.userId, params.messageType, params.slot ) return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] } } catch (error) { return { content: [{ type: 'text', text: 'Failed to retrieve invite message: ' + error }] } } }
- src/tools/invites.ts:82-92 (schema)Zod schema defining input parameters: userId (string), messageType (enum: 'message', 'response', 'request', 'requestResponse' with default 'message'), slot (number 0-11).{ userId: z.string().min(1).describe( 'Must be a valid user ID.' ), messageType: z.enum(['message', 'response', 'request', 'requestResponse']).default('message').describe( 'The type of message to fetch. Must be a valid InviteMessageType.' ), slot: z.number().min(0).max(11).describe( 'Slot number of the message to fetch.' ), },
- src/tools/invites.ts:70-116 (registration)Registers the vrchat_get_invite_message tool on the MCP server, specifying name, multi-line description, input schema, and handler function.server.tool( // Name 'vrchat_get_invite_message', // Description `Returns a specific invite message. Admin Credentials are required to view messages of other users! Message type refers to a different collection of messages: - message = Message during a normal invite - response = Message when replying to a message - request = Message when requesting an invite - requestResponse = Message when replying to a request for invite `, { userId: z.string().min(1).describe( 'Must be a valid user ID.' ), messageType: z.enum(['message', 'response', 'request', 'requestResponse']).default('message').describe( 'The type of message to fetch. Must be a valid InviteMessageType.' ), slot: z.number().min(0).max(11).describe( 'Slot number of the message to fetch.' ), }, async (params) => { try { await vrchatClient.auth() const response = await vrchatClient.inviteApi.getInviteMessage( params.userId, params.messageType, params.slot ) return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] } } catch (error) { return { content: [{ type: 'text', text: 'Failed to retrieve invite message: ' + error }] } } } )