vk_groups_get
Retrieve a user's community memberships from VKontakte by specifying user ID, filter type, fields, and count.
Instructions
Get list of communities the user is a member of
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | No | User ID | |
| filter | No | Filter by type | |
| fields | No | Community fields | |
| count | No | Number of communities |
Implementation Reference
- src/index.js:262-269 (handler)Handler function for vk_groups_get tool - processes arguments and calls vk.groupsGet with user_id, filter, fields (default: description,members_count), and count (default: 100) parameters
case 'vk_groups_get': result = await vk.groupsGet({ user_id: args.user_id, filter: args.filter, fields: args.fields || 'description,members_count', count: args.count || 100, }); break; - src/index.js:145-157 (schema)Tool schema definition for vk_groups_get - defines the tool name, description, and inputSchema with properties for user_id, filter, fields, and count
{ name: 'vk_groups_get', description: 'Get list of communities the user is a member of', inputSchema: { type: 'object', properties: { user_id: { type: 'number', description: 'User ID' }, filter: { type: 'string', description: 'Filter by type' }, fields: { type: 'string', description: 'Community fields' }, count: { type: 'number', description: 'Number of communities' }, }, }, }, - src/index.js:60-60 (helper)VKClient.groupsGet method - helper function that wraps the VK API 'groups.get' call with extended=1 parameter for detailed results
groupsGet(params) { return this.call('groups.get', { ...params, extended: 1 }); }