Skip to main content
Glama
vfa-khuongdv

MCP Chatwork Server

by vfa-khuongdv

complete_task

Mark a Chatwork task as done by specifying the room ID and task ID.

Instructions

Mark a task as done.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
room_idYesThe unique identifier of the Chatwork room.
task_idYesThe unique identifier of the task.

Implementation Reference

  • The main executor for the complete_task tool. It calls client.updateTaskStatus(room_id, task_id, 'done') on the ChatworkClient API and returns a text result or error.
    export const completeTaskTool = {
      name: "complete_task",
      description: "Mark a task as done.",
      schema: CompleteTaskSchema,
      executor: async (client: ChatworkClient, args: z.infer<typeof CompleteTaskSchema>) => {
        const { room_id, task_id } = args;
        try {
          const result = await client.updateTaskStatus(room_id, task_id, "done");
          return {
            content: [
              {
                type: "text" as const,
                text: `Task ${result.task_id} marked as done in room ${room_id}.`,
              },
            ],
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text" as const,
                text: `Failed to complete task: ${error instanceof Error ? error.message : String(error)}`,
              },
            ],
            isError: true,
          };
        }
      },
    };
  • Zod input validation schema for the complete_task tool: requires room_id (number) and task_id (number).
    export const CompleteTaskSchema = z.object({
      room_id: z.number().describe("The unique identifier of the Chatwork room."),
      task_id: z.number().describe("The unique identifier of the task."),
    });
  • src/index.ts:93-102 (registration)
    Registration of the complete_task tool with the MCP server using server.tool(), wiring name, description, schema, and executor.
    server.tool(
      completeTaskTool.name,
      completeTaskTool.description,
      completeTaskTool.schema.shape,
      async (args) => {
        // @ts-ignore
        return completeTaskTool.executor(client, args);
      }
    );
  • The ChatworkClient.updateTaskStatus() method that makes the PUT API call to /rooms/{roomId}/tasks/{taskId}/status with the status body.
    async updateTaskStatus(roomId: number, taskId: number, status: "open" | "done" | "limit"): Promise<{ task_id: number }> {
      try {
        const response = await this.client.put<{ task_id: number }>(
          `/rooms/${roomId}/tasks/${taskId}/status`,
          new URLSearchParams({ body: status })
        );
        return response.data;
      } catch (error) {
        if (axios.isAxiosError(error)) {
          throw new Error(`Chatwork API Error (Update Task Status Room ${roomId}): ${error.message} - ${JSON.stringify(error.response?.data)}`);
        }
        throw error;
      }
    }
  • src/tools/index.ts:8-8 (registration)
    Re-exports the completeTaskTool module from the tools barrel file.
    export * from "./completeTask.js";
Behavior2/5

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

With no annotations, the description should disclose behavioral traits. It only states the action without mentioning reversibility, permissions, or side effects.

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?

A single sentence is concise and front-loaded. No unnecessary words, though it could be slightly more descriptive without losing efficiency.

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 two-parameter tool with no output schema, the description is adequate. It covers the core action but lacks details on return values or side effects.

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 100%, so the schema already explains parameters. The description adds no additional meaning beyond the schema.

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 'Mark a task as done' clearly states the action on a specific resource. It distinguishes from siblings like create_task and delete_message, but does not explicitly differentiate.

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. No prerequisites or context provided.

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