vrchat_request_invite
Request an invite to a specific instance in VRChat by sending a notification to a user. Requires user ID, instance ID, and message slot details. Ensure explicit user permission before sending the request.
Instructions
Request an invite from a user. IMPORTANT: Always obtain explicit permission from the user before sending an invite request. Note that invite requests cannot be sent to users in private instances. Returns the Notification of type requestInvite that was sent.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instanceId | Yes | The instance ID to use when requesting an invite | |
| messageSlot | Yes | Slot number of the Request Message to use when request an invite | |
| userId | Yes | Must be a valid user ID |
Implementation Reference
- src/tools/invites.ts:46-67 (handler)Asynchronous handler for vrchat_request_invite tool. Authenticates VRChat client, requests invite via inviteApi.inviteUser, returns JSON response or error.async (params) => { try { await vrchatClient.auth() const response = await vrchatClient.inviteApi.inviteUser(params.userId, { instanceId: params.instanceId, messageSlot: params.messageSlot, }) return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] } } catch (error) { return { content: [{ type: 'text', text: 'Failed to request invite: ' + error }] } } }
- src/tools/invites.ts:41-45 (schema)Input schema using Zod for vrchat_request_invite: userId (string), instanceId (string), messageSlot (number 0-11).{ userId: z.string().min(1).describe('Must be a valid user ID'), instanceId: z.string().describe('The instance ID to use when requesting an invite'), messageSlot: z.number().min(0).max(11).describe('Slot number of the Request Message to use when request an invite'), },
- src/tools/invites.ts:36-68 (registration)Tool registration via server.tool('vrchat_request_invite', description, schema, handler) within createInvitesTools function.server.tool( // Name 'vrchat_request_invite', // Description 'Request an invite from a user. IMPORTANT: Always obtain explicit permission from the user before sending an invite request. Note that invite requests cannot be sent to users in private instances. Returns the Notification of type requestInvite that was sent.', { userId: z.string().min(1).describe('Must be a valid user ID'), instanceId: z.string().describe('The instance ID to use when requesting an invite'), messageSlot: z.number().min(0).max(11).describe('Slot number of the Request Message to use when request an invite'), }, async (params) => { try { await vrchatClient.auth() const response = await vrchatClient.inviteApi.inviteUser(params.userId, { instanceId: params.instanceId, messageSlot: params.messageSlot, }) return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] } } catch (error) { return { content: [{ type: 'text', text: 'Failed to request invite: ' + error }] } } } )