Skip to main content
Glama
bulatko

vk-mcp-server

vk_friends_get

Retrieve a user's friend list from VKontakte with options to filter by order, fields, and count.

Instructions

Get list of user friends

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idNoUser ID
orderNo
fieldsNoProfile fields
countNoNumber of friends

Implementation Reference

  • The vk_friends_get tool handler that executes the friends.get API call with parameters (user_id, order, fields, count)
    case 'vk_friends_get':
      result = await vk.friendsGet({
        user_id: args.user_id,
        order: args.order,
        fields: args.fields || 'photo_200,online',
        count: args.count || 100,
      });
      break;
  • Tool schema definition for vk_friends_get with name, description, and inputSchema specifying user_id, order (enum: hints/random/name), fields, and count parameters
    {
      name: 'vk_friends_get',
      description: 'Get list of user friends',
      inputSchema: {
        type: 'object',
        properties: {
          user_id: { type: 'number', description: 'User ID' },
          order: { type: 'string', enum: ['hints', 'random', 'name'] },
          fields: { type: 'string', description: 'Profile fields' },
          count: { type: 'number', description: 'Number of friends' },
        },
      },
    },
  • VKClient wrapper method that delegates to the generic call method with 'friends.get' as the VK API endpoint
    friendsGet(params) { return this.call('friends.get', params); }
  • Generic VK API call method that handles authentication, POST requests, and error responses for all VK API methods
    async call(method, params = {}) {
      const body = new URLSearchParams({
        ...params,
        access_token: this.accessToken,
        v: this.apiVersion,
      });
    
      const response = await fetch(`${VK_API_BASE}/${method}`, {
        method: 'POST',
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
        body: body.toString(),
      });
    
      const data = await response.json();
    
      if (data.error) {
        throw new Error(`VK API Error ${data.error.error_code}: ${data.error.error_msg}`);
      }
    
      return data.response;
    }
  • src/index.js:330-330 (registration)
    Registration of the tools array (which includes vk_friends_get) with the MCP server's ListToolsRequestSchema handler
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools }));
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. 'Get list' implies a read-only operation, but it doesn't specify authentication requirements, rate limits, pagination behavior, or what happens with invalid user IDs. For a tool with 4 parameters and no annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just 5 words, front-loading the core purpose without any wasted words. Every element ('Get', 'list', 'user friends') contributes directly to understanding the tool's function, making it efficient despite its brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 4 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what the tool returns (friend objects? just IDs?), how results are structured, or any constraints like maximum count values. For a data retrieval tool with multiple configuration options, this leaves too much undefined for reliable agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 75% (3 of 4 parameters have descriptions), so the baseline is 3. The description doesn't add any parameter-specific context beyond what the schema provides—it doesn't explain what 'hints', 'random', or 'name' ordering means, or what 'Profile fields' might include. It relies entirely on the schema for parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and resource 'list of user friends', making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'vk_users_get' or 'vk_groups_get' which also retrieve user-related data, missing an opportunity to clarify this specific friend-focused retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'vk_users_get' (which might retrieve user profiles) and 'vk_groups_get' (for group data), there's no indication of when friend retrieval is appropriate versus other user data sources, leaving the agent to guess based on tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bulatko/vk-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server