Skip to main content
Glama

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

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

使用方法

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

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

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

Related MCP server: Jotdown

機能

  • 目標の作成と管理

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

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

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

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

ロードマップ

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

  • 目標の削除

  • 完了の判断基準

  • 進捗可視化のためのUI

APIリファレンス

タスクIDの命名規則

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

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

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

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

ツール

サーバーは以下のツールを提供します(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 オブジェクトは簡略化されており、createdAtupdatedAtparentId は含まれません。

  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 オブジェクトは簡略化されており、createdAtupdatedAtparentId は含まれません。

  4. get_tasks

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

    • パラメータ:

      {
        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 オブジェクトは簡略化されており、createdAtupdatedAtparentId は含まれません。

  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 オブジェクトは簡略化されており、createdAtupdatedAtparentId は含まれません。

使用例

目標とタスクの作成

// 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

Install Server
A
license - permissive license
B
quality
C
maintenance

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/coderexpert123/task-orchestrator'

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