List Tasks

Retrieves a list of all tasks in the system with optional length limit.

JSON-RPC Request

{
  "jsonrpc": "2.0",
  "method": "list_tasks",
  "params": {
    "length": 50
  },
  "id": "unique-request-id"
}

Parameters

  • length (integer, optional): Maximum number of tasks to return

Response

{
  "jsonrpc": "2.0",
  "id": "unique-request-id",
  "result": [
    {
      "task_id": "task-uuid-1",
      "status": "completed",
      "created_at": "2024-01-01T00:00:00Z",
      "context_id": "context-uuid-1"
    },
    {
      "task_id": "task-uuid-2",
      "status": "running",
      "created_at": "2024-01-01T00:05:00Z",
      "context_id": "context-uuid-2"
    }
  ]
}

Error Response

{
  "jsonrpc": "2.0",
  "id": "unique-request-id",
  "error": {
    "code": -32001,
    "message": "No tasks found"
  }
}