Skip to main content
Glama
vfa-khuongdv

MCP Chatwork Server

by vfa-khuongdv

create_task

Assign a task to one or more users in a Chatwork room with a description and optional due date.

Instructions

Assign a task to a user in a Chatwork room.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
room_idYesThe unique identifier of the Chatwork room.
bodyYesTask description/body.
to_idsYesArray of account IDs to assign the task to.
limitNoTask due date (Unix timestamp).

Implementation Reference

  • Defines the create_task tool handler. The executor calls client.createTask with room_id, body, to_ids, and optional limit, then returns the result as JSON.
    export const createTaskTool = {
      name: "create_task",
      description: "Assign a task to a user in a Chatwork room.",
      schema: CreateTaskSchema,
      executor: async (client: ChatworkClient, args: z.infer<typeof CreateTaskSchema>) => {
        const result = await client.createTask(args.room_id, args.body, args.to_ids, args.limit);
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      },
    };
  • Input schema for create_task tool: requires room_id (number), body (string), to_ids (array of numbers), and optional limit (number, Unix timestamp).
    export const CreateTaskSchema = z.object({
      room_id: z.number().describe("The unique identifier of the Chatwork room."),
      body: z.string().describe("Task description/body."),
      to_ids: z.array(z.number()).describe("Array of account IDs to assign the task to."),
      limit: z.number().optional().describe("Task due date (Unix timestamp)."),
    });
  • src/index.ts:64-72 (registration)
    Registration of create_task tool with the MCP server using server.tool().
    server.tool(
      createTaskTool.name,
      createTaskTool.description,
      createTaskTool.schema.shape,
      async (args) => {
        // @ts-ignore
        return createTaskTool.executor(client, args);
      }
    );
  • API client method that sends a POST request to /rooms/{roomId}/tasks to create a task on Chatwork.
    async createTask(roomId: number, body: string, toIds: number[], limit?: number): Promise<{ task_ids: number[] }> {
      try {
        const params = new URLSearchParams();
        params.append("body", body);
        params.append("to_ids", toIds.join(","));
        if (limit) {
          params.append("limit", limit.toString());
        }
    
        const response = await this.client.post<{ task_ids: number[] }>(
          `/rooms/${roomId}/tasks`,
          params
        );
        return response.data;
      } catch (error) {
        if (axios.isAxiosError(error)) {
          throw new Error(`Chatwork API Error (Create Task 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 are provided, so the description must disclose behavioral traits. It only states the basic action without mentioning side effects (e.g., notifications), required permissions, idempotency, or return value. This lack of detail is insufficient for a mutation tool.

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 a single, focused sentence that is front-loaded with the verb and resource. Every word is necessary, and there is no extraneous information.

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?

Given the tool's simplicity and the schema's full coverage, the description provides a high-level understanding. However, the lack of an output schema and missing details about success/error responses leaves some gaps for an agent.

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 input schema has 100% description coverage, documenting all four parameters. The tool description adds no additional meaning beyond what is in the schema. Baseline score of 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 tool's purpose: 'Assign a task to a user in a Chatwork room.' It uses a specific verb ('assign') and identifies the resource ('task') and context ('Chatwork room'). This distinguishes it from sibling tools like 'complete_task' or 'delete_message'.

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, nor does it mention prerequisites or exclusion criteria. While the purpose is clear, there is no explicit usage context, requiring the agent to infer from the name 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/vfa-khuongdv/mcp-chatwork'

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