Comma Agents
@comma-agents/coreToolsBuilt-inTODO List System

todo_get_next

Get the next pending todo item without modifying the list.

The todo_get_next tool returns the next pending item without marking it complete or changing the list in any way. Use it when the agent needs to know what to work on next without yet committing to having finished the current step.

import { createAgent } from "@comma-agents/core";

const agent = createAgent({
  name: "planner",
  model: "openai/gpt-4o",
  tools: ["todo_add", "todo_complete", "todo_get", "todo_get_next", "todo_clear"],
});

Parameters

This tool takes no parameters.

Behavior

  • Returns the first item in the list whose status is "pending", in insertion order.
  • The list is not modified.
  • If there are no pending items, the tool returns [No pending todo items].
ToolPurpose
todo_addAdd a new pending item
todo_completeMark an item done, get the next pending item
todo_getList all items with status
todo_get_nextPeek at the next pending item
todo_clearRemove all items

On this page