Skip to main content
Glama
vfa-khuongdv

MCP Chatwork Server

by vfa-khuongdv

get_room_members

Retrieve the list of members in a Chatwork room by providing the room ID. Enables member access management and automation.

Instructions

Get the list of members in a room.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
room_idYesThe unique identifier of the Chatwork room.

Implementation Reference

  • The main tool object for 'get_room_members'. Defines name, description, Zod schema, and executor function that calls client.getRoomMembers(args.room_id) and returns the result as JSON.
    export const getRoomMembersTool = {
      name: "get_room_members",
      description: "Get the list of members in a room.",
      schema: GetRoomMembersSchema,
      executor: async (client: ChatworkClient, args: z.infer<typeof GetRoomMembersSchema>) => {
        const members = await client.getRoomMembers(args.room_id);
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(members, null, 2),
            },
          ],
        };
      },
    };
  • Zod schema for GetRoomMembersSchema: expects a 'room_id' (number) input parameter.
    import { z } from "zod";
    
    export const GetRoomMembersSchema = z.object({
      room_id: z.number().describe("The unique identifier of the Chatwork room."),
    });
  • src/index.ts:54-62 (registration)
    Registers the 'get_room_members' tool with the MCP server using getRoomMembersTool.name, .description, .schema.shape, and .executor.
    server.tool(
      getRoomMembersTool.name,
      getRoomMembersTool.description,
      getRoomMembersTool.schema.shape,
      async (args) => {
        // @ts-ignore
        return getRoomMembersTool.executor(client, args);
      }
    );
  • API client method getRoomMembers(roomId) that makes a GET request to /rooms/{roomId}/members and returns ChatworkMember[] data.
    async getRoomMembers(roomId: number): Promise<ChatworkMember[]> {
      try {
        const response = await this.client.get<ChatworkMember[]>(`/rooms/${roomId}/members`);
        return response.data;
      } catch (error) {
        if (axios.isAxiosError(error)) {
          throw new Error(`Chatwork API Error (Get Members Room ${roomId}): ${error.message} - ${JSON.stringify(error.response?.data)}`);
        }
        throw error;
      }
    }
Behavior2/5

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

No annotations provided. The description simply says 'get' implying a read operation, but it does not disclose potential edge cases (e.g., invalid room_id) or behavioral details like authentication requirements or rate limits.

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?

Single sentence, no wasted words. However, it is minimal and could benefit from a bit more context without becoming verbose.

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 read tool with one parameter, the description is adequate. However, it does not describe the expected return format (e.g., list of user IDs or objects), which would be helpful since no output schema is provided.

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% with one parameter (room_id) already well-described. The description adds no additional meaning beyond what the schema provides, so baseline 3 is appropriate.

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 action ('Get'), resource ('list of members'), and context ('in a room'). It is specific and distinct from sibling tools like list_messages or list_rooms.

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?

No guidance on when to use this tool versus alternatives. There is no mention of prerequisites, exclusion criteria, or suggested usage scenarios.

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/vfa-khuongdv/mcp-chatwork'

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