vrchat_request_invite
Send an invite request to a VRChat user for joining their instance, requiring explicit user permission and valid instance details.
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 |
|---|---|---|---|
| userId | Yes | Must be a valid user ID | |
| 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 |
Implementation Reference
- src/tools/invites.ts:46-67 (handler)Async handler function that authenticates the VRChat client, requests an invite using inviteApi.inviteUser with provided userId, instanceId, and messageSlot, and returns the JSON response or error message.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)Zod input schema defining parameters for the tool: 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-69 (registration)Registers the vrchat_request_invite tool on the MCP server with name, description, input schema, and handler function inside createInvitesTools.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 }] } } } )