vrchat_send_friend_request
Send a friend request to a VRChat user by providing their user ID, enabling connection through the VRChat MCP Server.
Instructions
Send a friend request to another user.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes |
Implementation Reference
- src/tools/friends.ts:14-32 (handler)The handler function that authenticates the VRChat client, sends a friend request to the specified userId using the friendsApi, and returns the response as text or an error message.async (params) => { try { await vrchatClient.auth() const response = await vrchatClient.friendsApi.friend(params.userId) return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] } } catch (error) { return { content: [{ type: 'text', text: 'Failed to send friend request: ' + error }] } } }
- src/tools/friends.ts:11-13 (schema)Input schema using Zod, requiring a non-empty string 'userId'.{ userId: z.string().min(1), },
- src/tools/friends.ts:6-33 (registration)Registers the tool 'vrchat_send_friend_request' on the McpServer instance within the createFriendsTools function, specifying name, description, input schema, and handler.server.tool( // Name 'vrchat_send_friend_request', // Description 'Send a friend request to another user.', { userId: z.string().min(1), }, async (params) => { try { await vrchatClient.auth() const response = await vrchatClient.friendsApi.friend(params.userId) return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] } } catch (error) { return { content: [{ type: 'text', text: 'Failed to send friend request: ' + error }] } } } )