Skip to main content
Glama
bulatko

vk-mcp-server

vk_wall_post

Publish posts to VKontakte walls using the VK API. Create text content for user or community profiles with customizable ownership settings.

Instructions

Publish a new post on a wall

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
owner_idNoWall owner ID
messageYesPost text content
from_groupNoPost on behalf of community

Implementation Reference

  • The vk_wall_post tool handler that processes tool calls, extracts arguments, and calls vk.wallPost() with owner_id, message, and from_group parameters
    case 'vk_wall_post':
      result = await vk.wallPost({
        owner_id: args.owner_id,
        message: args.message,
        from_group: args.from_group ? 1 : 0,
      });
      break;
  • Tool schema definition for vk_wall_post with name, description, inputSchema defining owner_id, message (required), and from_group parameters
    {
      name: 'vk_wall_post',
      description: 'Publish a new post on a wall',
      inputSchema: {
        type: 'object',
        properties: {
          owner_id: { type: 'number', description: 'Wall owner ID' },
          message: { type: 'string', description: 'Post text content' },
          from_group: { type: 'boolean', description: 'Post on behalf of community' },
        },
        required: ['message'],
      },
    },
  • VKClient.wallPost method that wraps the VK API wall.post call
    wallPost(params) { return this.call('wall.post', params); }
  • VKClient.call method that executes VK API requests with authentication and error handling
    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;
    }
  • The handleToolCall function that routes tool requests to appropriate VK API methods based on tool name
    async function handleToolCall(name, args) {
      try {
        let result;
    
        switch (name) {
          case 'vk_users_get':
            result = await vk.usersGet({
              user_ids: args.user_ids,
              fields: args.fields || 'photo_200,online,status',
            });
            break;
    
          case 'vk_wall_get':
            result = await vk.wallGet({
              owner_id: args.owner_id,
              domain: args.domain,
              count: args.count || 20,
              offset: args.offset,
            });
            break;
    
          case 'vk_wall_post':
            result = await vk.wallPost({
              owner_id: args.owner_id,
              message: args.message,
              from_group: args.from_group ? 1 : 0,
            });
            break;
    
          case 'vk_wall_create_comment':
            result = await vk.wallCreateComment({
              owner_id: args.owner_id,
              post_id: args.post_id,
              message: args.message,
            });
            break;
    
          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;
    
          case 'vk_groups_get_by_id':
            result = await vk.groupsGetById({
              group_ids: args.group_ids,
              fields: args.fields || 'description,members_count',
            });
            break;
    
          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;
    
          case 'vk_newsfeed_get':
            result = await vk.newsfeedGet({
              filters: args.filters || 'post',
              count: args.count || 20,
              start_from: args.start_from,
            });
            break;
    
          case 'vk_stats_get':
            result = await vk.statsGet({
              group_id: args.group_id,
              interval: args.interval || 'day',
              intervals_count: args.intervals_count || 7,
            });
            break;
    
          case 'vk_photos_get':
            result = await vk.photosGet({
              owner_id: args.owner_id,
              album_id: args.album_id || 'wall',
              count: args.count || 50,
            });
            break;
    
          default:
            throw new Error(`Unknown tool: ${name}`);
        }
    
        return JSON.stringify(result, null, 2);
      } catch (error) {
        return JSON.stringify({ error: error.message });
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Publish' implies a write/mutation operation, it doesn't specify critical behaviors: whether this requires specific permissions, rate limits, whether posts are editable/deletable after creation, or what happens on success/failure. The description is minimal and lacks operational context.

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 - a single sentence with no wasted words. It's front-loaded with the core purpose and uses clear, direct language. Every word earns its place in this minimal but complete statement of function.

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?

For a mutation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what happens after posting (e.g., returns a post ID, success status), error conditions, authentication requirements, or how it fits within the VK API ecosystem alongside its siblings. The minimal description leaves too many operational questions unanswered.

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?

The schema has 100% description coverage, so all parameters are documented in the structured schema. The description adds no additional parameter semantics beyond what's already in the schema (owner_id, message, from_group). This meets the baseline expectation when schema coverage is complete.

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 action ('Publish') and resource ('a new post on a wall'), making the tool's purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'vk_wall_get' (which retrieves posts) or 'vk_wall_create_comment' (which adds comments), missing an opportunity for clearer distinction in the VK API context.

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. There's no mention of prerequisites (like authentication needs), when not to use it, or how it differs from related tools like 'vk_wall_create_comment' for commenting or 'vk_wall_get' for reading posts.

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