Skip to main content
Glama
Task Orchestration

Task Orchestration

タスクオーケストレーター

タスクのオーケストレーションと管理を行うためのModel Context Protocol (MCP) サーバーです。このツールは、目標を管理可能なタスクに分解し、その進捗を追跡するのに役立ちます。

使用方法

理想的には、LLMはこのMCPツールをいつ使用すべきかを理解できるはずです。サンプルプロンプトとしては、以下のようなものが機能する可能性があります。

"新しい開発目標を作成してください。目標は「ユーザー認証の実装」で、対象は「my-web-app」リポジトリです。"

何か問題が発生した場合は、上部の「Discussions」タブで新しいIssueを作成して知らせてください。

Related MCP server: Claudia

機能

  • 目標の作成と管理

  • 目標を階層的なタスクに分解

  • タスクの完了ステータスの追跡

  • サブタスクおよび親タスクとサブタスク間の依存関係管理のサポート

  • LokiDBを使用した永続ストレージ

ロードマップ

  • 複雑なタスク/目標間の依存関係オーケストレーション

  • 目標の削除

  • 完了の判断基準

  • 進捗可視化のためのUI

APIリファレンス

タスクIDの命名規則

タスクIDはドット表記(例: "1", "1.1", "1.1.1")を使用し、各セグメントが階層内のレベルを表します。

  • 新しい目標ごとに、トップレベルのタスクIDは "1" から始まり、順次増加します(例: "1", "2", "3")。

  • サブタスクは、親のIDに新しいセグメントを追加して形成されます(例: "1.1" は "1" のサブタスク)。

  • goalId と taskId の組み合わせは一意であることが保証されます。

ツール

サーバーは以下のツールを提供します(build/index.js に基づく)。

  1. create_goal

    • 新しい目標を作成します

    • パラメータ:

      {
        description: string;  // The goal description
        repoName: string;     // The repository name associated with this goal
      }
    • サンプル入力:

      {
        "description": "Implement user authentication",
        "repoName": "example/auth-service"
      }
    • 戻り値: { goalId: number }

  2. add_tasks

    • 目標に複数のタスクを追加します。タスクは階層構造で提供できます。既存のタスクの子であるタスクには、parentId フィールドを使用してください。この操作はトランザクション処理されます。バッチ内のすべてのタスクが成功するか、操作全体が失敗します。

    • パラメータ:

      {
        goalId: number; // ID of the goal to add tasks to (number)
        tasks: Array<{
          title: string; // Title of the task (string)
          description: string; // Detailed description of the task (string)
          parentId?: string | null; // Optional parent task ID for tasks that are children of *existing* tasks. Do not use for new subtasks defined hierarchically within this batch.
          subtasks?: Array<any>; // An array of nested subtask objects to be created under this task.
        }>;
      }
    • サンプル入力:

      {
        "goalId": 1,
        "tasks": [
          {
            "title": "Design database schema",
            "description": "Define tables for users, roles, and permissions",
            "subtasks": [
              {
                "title": "Create ERD",
                "description": "Draw entity-relationship diagram"
              }
            ]
          },
          {
            "title": "Implement user registration",
            "description": "Create API endpoint for new user signup",
            "parentId": "1"
          }
        ]
      }
    • 戻り値: HierarchicalTaskResponse[]。HierarchicalTaskResponse オブジェクトは簡略化されており、createdAt、updatedAt、parentId は含まれません。

  3. remove_tasks

    • 目標から複数のタスクを論理削除します。タスクは削除済みとしてマークされますが、システム内には残ります。デフォルトでは、サブタスクを持つ親タスクは、その子を明示的に削除しない限り論理削除できません。論理削除されたタスクは、includeDeletedTasks が true に設定されていない限り、デフォルトで get_tasks の結果から除外されます。

    • パラメータ:

      {
        goalId: number; // ID of the goal to remove tasks from
        taskIds: string[]; // IDs of the tasks to remove (array of strings). Task IDs use dot-notation (e.g., "1", "1.1").
        deleteChildren?: boolean; // Whether to delete child tasks along with the parent (boolean). Defaults to false. If false, attempting to delete a parent task with existing subtasks will throw an error.
      }
    • サンプル入力(子を削除しない場合):

      {
        "goalId": 1,
        "taskIds": ["2", "3"]
      }
    • サンプル入力(子を削除する場合):

      {
        "goalId": 1,
        "taskIds": ["1"],
        "deleteChildren": true
      }
    • 戻り値: { removedTasks: TaskResponse[], completedParents: TaskResponse[] }。TaskResponse オブジェクトは簡略化されており、createdAt、updatedAt、parentId は含まれません。

  4. get_tasks

    • 目標のタスクを取得します。タスクIDはドット表記(例: "1", "1.1", "1.1.1")を使用します。includeSubtasks が指定されている場合、レスポンスは階層的なタスクオブジェクトを返します。それ以外の場合は、createdAt、updatedAt、parentId を含まない簡略化されたタスクオブジェクトが返されます。

    • パラメータ:

      {
        goalId: number; // ID of the goal to get tasks for (number)
        taskIds?: string[]; // Optional: IDs of tasks to fetch (array of strings). If null or empty, all tasks for the goal will be fetched.
        includeSubtasks?: "none" | "first-level" | "recursive"; // Level of subtasks to include: "none" (only top-level tasks), "first-level" (top-level tasks and their direct children), or "recursive" (all nested subtasks). Defaults to "none".
        includeDeletedTasks?: boolean; // Whether to include soft-deleted tasks in the results (boolean). Defaults to false.
      }
    • サンプル入力:

      {
        "goalId": 1,
        "includeSubtasks": "recursive",
        "includeDeletedTasks": true
      }
    • 戻り値: TaskResponse[]。TaskResponse オブジェクトは簡略化されており、createdAt、updatedAt、parentId は含まれません。

  5. complete_task_status

    • タスクを完了としてマークします。デフォルトでは、未完了の子タスクがある場合、親タスクを完了としてマークすることはできません。

    • パラメータ:

      {
        goalId: number; // ID of the goal containing the tasks
        taskIds: string[]; // IDs of the tasks to update (array of strings). Task IDs use dot-notation (e.g., "1", "1.1").
        completeChildren?: boolean; // Whether to complete all child tasks recursively (boolean). Defaults to false. If false, a task can only be completed if all its subtasks are already complete.
      }
    • サンプル入力(子を完了させない場合):

      {
        "goalId": 1,
        "taskIds": ["1", "2"]
      }
    • サンプル入力(子を完了させる場合):

      {
        "goalId": 1,
        "taskIds": ["1"],
        "completeChildren": true
      }
    • 戻り値: TaskResponse[]。TaskResponse オブジェクトは簡略化されており、createdAt、updatedAt、parentId は含まれません。

使用例

目標とタスクの作成

// Create a new goal. Its top-level tasks will start with ID "1".
const goal = await callTool('create_goal', {
  description: 'Implement user authentication',
  repoName: 'user/repo'
});

// Add a top-level task
const task1 = await callTool('add_tasks', {
  goalId: goal.goalId,
  tasks: [
    {
      title: 'Set up authentication middleware',
      description: 'Implement JWT-based authentication'
    }
  ]
});
// task1.addedTasks[0].id will be "1"

// Add a subtask to the previously created task "1"
const task2 = await callTool('add_tasks', {
  goalId: goal.goalId,
  tasks: [
    {
      title: 'Create login endpoint',
      description: 'Implement POST /auth/login',
      parentId: "1"  // ParentId must refer to an *already existing* task ID
    }
  ]
});
// task2.addedTasks[0].id will be "1.1"

タスクステータスの管理

// Mark a parent task as complete, which will also complete its children
await callTool('complete_task_status', {
  goalId: 1,
  taskIds: ["1"],
  completeChildren: true
});

// Get all tasks including subtasks recursively
const allTasks = await callTool('get_tasks', {
  goalId: 1,
  includeSubtasks: "recursive"
});

タスクの削除

// Attempt to remove a parent task without deleting children (will fail if it has subtasks)
try {
  await callTool('remove_tasks', {
    goalId: 1,
    taskIds: ["1"]
  });
} catch (error) {
  console.error(error.message); // Expected to throw an error if subtasks exist
}

// Remove a parent task and its children
await callTool('remove_tasks', {
  goalId: 1,
  taskIds: ["1"],
  deleteChildren: true
});

開発

前提条件

  • Node.js 18+

  • pnpm

セットアップ

  1. 依存関係のインストール:

    pnpm install
  2. プロジェクトのビルド:

    pnpm build
  3. テストの実行:

    pnpm test

プロジェクト構造

  • src/ - ソースコード

    • index.ts - メインサーバー実装

    • storage.ts - データ永続化レイヤー

    • types.ts - TypeScript型定義

    • prompts.ts - AIプロンプトテンプレート

    • __tests__/ - テストファイル

ライセンス

MIT

Available Tools

5 tools
add_tasksA

Add multiple tasks to a goal. Tasks can be provided in a hierarchical structure. For tasks that are children of existing tasks, use the parentId field. The operation is transactional: either all tasks in the batch succeed, or the entire operation fails.

Inputs: goalId (required), tasks (required).

complete_task_statusC

Update the completion status of tasks. Task IDs use a dot-notation (e.g., "1", "1.1", "1.1.1"). Responses will return simplified task objects without createdAt, updatedAt, or parentId.

Inputs: goalId (required), taskIds (required), completeChildren.

create_goalC

Create a new goal

Inputs: description (required), repoName.

get_tasksB

Get tasks for a goal. Task IDs use a dot-notation (e.g., "1", "1.1", "1.1.1"). When includeSubtasks is specified, responses will return hierarchical task objects. Otherwise, simplified task objects without createdAt, updatedAt, or parentId will be returned.

Inputs: goalId (required), taskIds, includeSubtasks, includeDeletedTasks.

remove_tasksA

Soft-delete multiple tasks from a goal. Tasks are marked as deleted but remain in the system. Task IDs use a dot-notation (e.g., "1", "1.1", "1.1.1"). Responses will return simplified task objects without createdAt, updatedAt, or parentId. Soft-deleted tasks are excluded by default from get_tasks results unless includeDeletedTasks is set to true.

Inputs: goalId (required), taskIds (required), deleteChildren.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: add_tasks for batch creation, complete_task_status for updating status, create_goal for goal creation, get_tasks for retrieval, and remove_tasks for soft deletion. There is no overlap in functionality, making it easy for an agent to select the correct tool.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern (e.g., add_tasks, complete_task_status, create_goal, get_tasks, remove_tasks). The naming is uniform and predictable, with no deviations in style or convention.

    Tool Count5/5

    With 5 tools, the server is well-scoped for task orchestration, covering core operations like creation, retrieval, update, and deletion. Each tool serves a necessary function without redundancy, fitting typical server sizes of 3-15 tools.

    Completeness4/5

    The tool set provides strong coverage for task management, including CRUD-like operations (create, get, update status, soft delete) and goal creation. A minor gap exists in updating goal details or hard-deleting tasks, but agents can work around this with the available tools.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers