vrchat_get_instance
Retrieve information about a specific VRChat instance by providing world and instance IDs. Access details like member data when authorized as the instance owner.
Instructions
Get information about a specific instance. Note: Detailed information about instance members is only available if you are the instance owner.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| worldId | Yes | Must be a valid world ID. | |
| instanceId | Yes | Must be a valid instance ID. |
Implementation Reference
- src/tools/instances.ts:15-33 (handler)The handler function that authenticates the VRChat client, retrieves the instance data using the instances API, and returns the JSON-formatted instance information or an error message.async (params) => { try { await vrchatClient.auth() const instance = await vrchatClient.instancesApi.getInstance(params.worldId, params.instanceId) return { content: [{ type: 'text', text: JSON.stringify(instance.data, null, 2) }] } } catch (error) { return { content: [{ type: 'text', text: 'Failed to get instance: ' + error }] } } }
- src/tools/instances.ts:11-14 (schema)Input schema defining the required parameters 'worldId' and 'instanceId' using Zod validation.{ worldId: z.string().describe('Must be a valid world ID.'), instanceId: z.string().describe('Must be a valid instance ID.'), },
- src/tools/instances.ts:7-34 (registration)Registers the 'vrchat_get_instance' tool on the MCP server with name, description, input schema, and handler function.// Name 'vrchat_get_instance', // Description 'Get information about a specific instance. Note: Detailed information about instance members is only available if you are the instance owner.', { worldId: z.string().describe('Must be a valid world ID.'), instanceId: z.string().describe('Must be a valid instance ID.'), }, async (params) => { try { await vrchatClient.auth() const instance = await vrchatClient.instancesApi.getInstance(params.worldId, params.instanceId) return { content: [{ type: 'text', text: JSON.stringify(instance.data, null, 2) }] } } catch (error) { return { content: [{ type: 'text', text: 'Failed to get instance: ' + error }] } } } )
- src/main.ts:33-33 (registration)Calls createInstancesTools to register the vrchat_get_instance tool (among others) on the main MCP server instance.createInstancesTools(server, vrchatClient)