Skip to main content
Glama

create_group

Create a new group chat with a specified name and optional description, and add initial members by their open IDs.

Instructions

[Official API] Create a new group chat (as bot). Can add initial members.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesGroup name
descriptionNoGroup description (optional)
user_idsNoInitial member open_ids (optional)

Implementation Reference

  • The handler function for create_group. Calls ctx.getOfficialClient().createChat() with the name, description, and user_ids from args, then returns a text response with the new chat ID.
    async create_group(args, ctx) {
      return text(`Group created: ${(await ctx.getOfficialClient().createChat({ name: args.name, description: args.description, userIds: args.user_ids })).chatId}`);
    },
  • Schema definition for the create_group tool. Defines name as required, with optional description and user_ids (array of strings) as inputs.
    const schemas = [
      {
        name: 'create_group',
        description: '[Official API] Create a new group chat (as bot). Can add initial members.',
        inputSchema: {
          type: 'object',
          properties: {
            name: { type: 'string', description: 'Group name' },
            description: { type: 'string', description: 'Group description (optional)' },
            user_ids: { type: 'array', items: { type: 'string' }, description: 'Initial member open_ids (optional)' },
          },
          required: ['name'],
        },
      },
  • The underlying API client method `createChat` that actually calls the Feishu SDK's im.chat.create API. Maps input args to SDK parameters and returns the new chat_id.
    async createChat({ name, description, userIds, botIds } = {}) {
      const data = {};
      if (name) data.name = name;
      if (description) data.description = description;
      if (userIds) data.user_id_list = userIds;
      if (botIds) data.bot_id_list = botIds;
      const res = await this._safeSDKCall(
        () => this.client.im.chat.create({ params: { user_id_type: 'open_id' }, data }),
        'createChat'
      );
      return { chatId: res.data.chat_id };
    },
  • src/server.js:37-57 (registration)
    Registration mechanism: groups.js is loaded via TOOL_MODULES, its schemas are collected into TOOLS, and its handlers are merged into HANDLERS by name. create_group is dispatched via HANDLERS[name] in the CallToolRequest handler.
    const TOOL_MODULES = [
      require('./tools/bitable'),
      require('./tools/calendar'),
      require('./tools/contacts'),
      require('./tools/diagnostics'),
      require('./tools/docs'),
      require('./tools/drive'),
      require('./tools/events'),
      require('./tools/groups'),
      require('./tools/im-read'),
      require('./tools/messaging-bot'),
      require('./tools/messaging-user'),
      require('./tools/okr'),
      require('./tools/profile'),
      require('./tools/tasks'),
      require('./tools/uploads'),
      require('./tools/wiki'),
    ];
    
    const TOOLS = TOOL_MODULES.flatMap((m) => m.schemas);
    const HANDLERS = Object.fromEntries(TOOL_MODULES.flatMap((m) => Object.entries(m.handlers)));
Behavior2/5

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

No annotations exist, so the description must clarify side effects. It states the creation action and optional member addition, but omits details on what the bot's role is, whether the group is immediately active, or any rate limits. This is minimal for a creation tool.

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

Conciseness4/5

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

The description is a single sentence covering the core action and key behavior (adding members). It is concise without fluff, though it could be slightly expanded for context.

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

Completeness3/5

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

For a simple creation tool with three parameters and no output schema, the description covers the purpose but lacks details on return values (e.g., group ID) and post-creation state. It is adequate but not comprehensive.

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 coverage is 100%, so baseline is 3. The description adds minor context ('as bot' for the tool itself, 'initial members' for user_ids) but does not significantly enrich parameter meaning beyond the schema.

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

Purpose5/5

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

The description clearly states the verb 'Create' and the resource 'new group chat', specifying it's as a bot. It differentiates from siblings like 'create_p2p_chat' and 'send_to_group' by focusing on group creation.

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

Usage Guidelines3/5

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

While it indicates the tool is for bots with '(as bot)', it lacks explicit guidance on when to use it versus alternatives (e.g., via API) or prerequisites like permissions. No exclusions or when-not-to-use are mentioned.

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/EthanQC/feishu-user-plugin'

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