Back to MCP Overview

Agent tasks Tools

An agent’s task list: add, read, update and stop tasks.

5 tools

Available Tools

agentTasks_add

Add a task to one agent's task list (it outlives runs, like a to-do list the agent works through). Params: agentId (aiAgent_listSpecialists), goal (one line, at most 300 characters), doneWhen? (how anyone can tell it is done, in plain words), startsBySelf?, startAt?. When the agent works through its to-do (or startsBySelf "yes"), it starts by itself when the agent is free, one at a time, within its limits; a limit leaves it Planned with the reason. A start of the agent with no task text takes its oldest Planned task (every start is one task), is told the goal and "Done when", and keeps the status itself. Returns { id }. From the AI, switching on what starts an agent by itself waits for the person's OK (the approval card); switching off is at once. A task that starts by itself (yes or startAt) is one of those.

Input Schema

agentIdstringrequired

The agent id

goalstringrequired
doneWhenstring

How anyone can tell the task is done, in plain words.

startsBySelfstring

Starts by itself? agent = the agent's "Work through its to-do" setting (default); yes = as soon as the agent is free; no = waits for its schedule or Run a task.

startAtstringnull

When it starts by itself (ISO date-time at least a minute from now; a sooner or past time is refused). Busy then: it goes next.

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "agentTasks_add",
    "arguments": {
          "agentId": "example",
          "goal": "example",
          "doneWhen": "example"
    }
  }
}
agentTasks_list

One agent's tasks, newest first; a Lead's adds its group members'. Params: agentId, status? (planned, working, waiting_on_you, done or stopped), limit?. Each task: id, agentId, goal, doneWhen, status, reason (why it is stopped or waiting on you), startsBySelf, startAt, runId, threadId, costCredits, source (where it came from), parentTaskId (the task that started it), createdAt, updatedAt.

Input Schema

agentIdstringrequired
statusstring

A filter.

limitinteger

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "agentTasks_list",
    "arguments": {
          "agentId": "example",
          "status": "example",
          "limit": {}
    }
  }
}
agentTasks_get

One task by taskId: id, agentId, goal, doneWhen, status, reason, startsBySelf, startAt, runId, threadId, costCredits, source (where it came from), parentTaskId (the task that started it), handedByAgentId, children (tasks it started: id, agentId, source, status, result), createdAt, updatedAt.

Input Schema

taskIdstringrequired

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "agentTasks_get",
    "arguments": {
          "taskId": "example"
    }
  }
}
agentTasks_update

Change one task. Params: taskId, goal? (one line), doneWhen?, status? ("planned" puts a waiting or stopped task back on the list, for a start with no task text to take; "done" closes it).

Input Schema

taskIdstringrequired
goalstring
doneWhenstring

How anyone can tell the task is done, in plain words.

statusstring
startsBySelfstring
startAtstringnull

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "agentTasks_update",
    "arguments": {
          "taskId": "example",
          "goal": "example",
          "doneWhen": "example"
    }
  }
}
agentTasks_stop

Stop a task (not done) so no run takes it; stops its run (params: taskId, reason: why, in plain words). Reopen: agentTasks_update status "planned".

Input Schema

taskIdstringrequired
reasonstringrequired

Example Call

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "agentTasks_stop",
    "arguments": {
          "taskId": "example",
          "reason": "example"
    }
  }
}