<tools>
  <important>
  The todo tool is available for organizing complex tasks when needed. Each subagent has their own
  separate todo list - your todos are private to you and do not interfere with other agents' todos.

  WHEN TO USE TODOS:
  - Planning complex multi-step operations
  - Tracking multiple parallel workstreams
  - When you need to remember tasks to return to later
  - Organizing large-scope assessments with many components

  WHEN NOT NEEDED:
  - Simple, straightforward tasks
  - Linear workflows where progress is obvious
  - Short tasks that can be completed quickly

  If you do use todos, batch operations together to minimize tool calls.
  </important>

  <tool name="create_todo">
    <description>Create a new todo item to track tasks, goals, and progress.</description>
    <details>Use this tool when you need to track multiple tasks or plan complex operations.
  Each subagent maintains their own independent todo list - your todos are yours alone.

  Useful for breaking down complex tasks into smaller, manageable items when the workflow
  is non-trivial or when you need to track progress across multiple components.</details>
    <parameters>
      <parameter name="title" type="string" required="false">
        <description>Short, actionable title for the todo (e.g., "Test login endpoint for SQL injection")</description>
      </parameter>
      <parameter name="todos" type="string" required="false">
        <description>Create multiple todos at once. Provide a JSON array of {"title": "...", "description": "...", "priority": "..."} objects or a newline-separated bullet list.</description>
      </parameter>
      <parameter name="description" type="string" required="false">
        <description>Detailed description or notes about the task</description>
      </parameter>
      <parameter name="priority" type="string" required="false">
        <description>Priority level: "low", "normal", "high", "critical" (default: "normal")</description>
      </parameter>
    </parameters>
    <returns type="Dict[str, Any]">
      <description>Response containing: - created: List of created todos with their IDs - todos: Full sorted todo list - success: Whether the operation succeeded</description>
    </returns>
    <examples>
  # Create a high priority todo
  <function=create_todo>
  <parameter=title>Test authentication bypass on /api/admin</parameter>
  <parameter=description>The admin endpoint seems to have weak authentication. Try JWT manipulation, session fixation, and privilege escalation.</parameter>
  <parameter=priority>high</parameter>
  </function>

  # Create a simple todo
  <function=create_todo>
  <parameter=title>Enumerate all API endpoints</parameter>
  </function>

  # Bulk create todos (JSON array)
  <function=create_todo>
  <parameter=todos>[{"title": "Map all admin routes", "priority": "high"}, {"title": "Check forgotten password flow"}]</parameter>
  </function>

  # Bulk create todos (bullet list)
  <function=create_todo>
  <parameter=todos>
  - Capture baseline traffic in proxy
  - Enumerate S3 buckets for leaked assets
  - Compare responses for timing differences
  </parameter>
  </function>
    </examples>
  </tool>

  <tool name="list_todos">
    <description>List all todos with optional filtering by status or priority.</description>
  <details>Use this when you need to check your current todos, get fresh IDs, or reprioritize.
  The list is sorted: done first, then in_progress, then pending. Within each status, sorted by priority (critical > high > normal > low).
  Each subagent has their own independent todo list.</details>
    <parameters>
      <parameter name="status" type="string" required="false">
        <description>Filter by status: "pending", "in_progress", "done"</description>
      </parameter>
      <parameter name="priority" type="string" required="false">
        <description>Filter by priority: "low", "normal", "high", "critical"</description>
      </parameter>
    </parameters>
    <returns type="Dict[str, Any]">
      <description>Response containing: - todos: List of todo items - total_count: Total number of todos - summary: Count by status (pending, in_progress, done)</description>
    </returns>
    <examples>
  # List all todos
  <function=list_todos>
  </function>

  # List only pending todos
  <function=list_todos>
  <parameter=status>pending</parameter>
  </function>

  # List high priority items
  <function=list_todos>
  <parameter=priority>high</parameter>
  </function>
    </examples>
  </tool>

  <tool name="update_todo">
  <description>Update one or multiple todo items. Prefer bulk updates in a single call when updating multiple items.</description>
    <parameters>
      <parameter name="todo_id" type="string" required="false">
        <description>ID of a single todo to update (for simple updates)</description>
      </parameter>
      <parameter name="updates" type="string" required="false">
        <description>Bulk update multiple todos at once. JSON array of objects with todo_id and fields to update: [{"todo_id": "abc", "status": "done"}, {"todo_id": "def", "priority": "high"}].</description>
      </parameter>
      <parameter name="title" type="string" required="false">
        <description>New title (used with todo_id)</description>
      </parameter>
      <parameter name="description" type="string" required="false">
        <description>New description (used with todo_id)</description>
      </parameter>
      <parameter name="priority" type="string" required="false">
        <description>New priority: "low", "normal", "high", "critical" (used with todo_id)</description>
      </parameter>
      <parameter name="status" type="string" required="false">
        <description>New status: "pending", "in_progress", "done" (used with todo_id)</description>
      </parameter>
    </parameters>
    <returns type="Dict[str, Any]">
      <description>Response containing: - updated: List of updated todo IDs - updated_count: Number updated - todos: Full sorted todo list - errors: Any failed updates</description>
    </returns>
    <examples>
  # Single update
  <function=update_todo>
  <parameter=todo_id>abc123</parameter>
  <parameter=status>in_progress</parameter>
  </function>

  # Bulk update - mark multiple todos with different statuses in ONE call
  <function=update_todo>
  <parameter=updates>[{"todo_id": "abc123", "status": "done"}, {"todo_id": "def456", "status": "in_progress"}, {"todo_id": "ghi789", "priority": "critical"}]</parameter>
  </function>
    </examples>
  </tool>

  <tool name="mark_todo_done">
  <description>Mark one or multiple todos as completed in a single call.</description>
  <details>Mark todos as done after completing them. Group multiple completions into one call using todo_ids when possible.</details>
    <parameters>
      <parameter name="todo_id" type="string" required="false">
        <description>ID of a single todo to mark as done</description>
      </parameter>
      <parameter name="todo_ids" type="string" required="false">
        <description>Mark multiple todos done at once. JSON array of IDs: ["abc123", "def456"] or comma-separated: "abc123, def456"</description>
      </parameter>
    </parameters>
    <returns type="Dict[str, Any]">
      <description>Response containing: - marked_done: List of IDs marked done - marked_count: Number marked - todos: Full sorted list - errors: Any failures</description>
    </returns>
    <examples>
  # Mark single todo done
  <function=mark_todo_done>
  <parameter=todo_id>abc123</parameter>
  </function>

  # Mark multiple todos done in ONE call
  <function=mark_todo_done>
  <parameter=todo_ids>["abc123", "def456", "ghi789"]</parameter>
  </function>
    </examples>
  </tool>

  <tool name="mark_todo_pending">
    <description>Mark one or multiple todos as pending (reopen completed tasks).</description>
    <details>Use this to reopen tasks that were marked done but need more work. Supports bulk operations.</details>
    <parameters>
      <parameter name="todo_id" type="string" required="false">
        <description>ID of a single todo to mark as pending</description>
      </parameter>
      <parameter name="todo_ids" type="string" required="false">
        <description>Mark multiple todos pending at once. JSON array of IDs: ["abc123", "def456"] or comma-separated: "abc123, def456"</description>
      </parameter>
    </parameters>
    <returns type="Dict[str, Any]">
      <description>Response containing: - marked_pending: List of IDs marked pending - marked_count: Number marked - todos: Full sorted list - errors: Any failures</description>
    </returns>
    <examples>
  # Mark single todo pending
  <function=mark_todo_pending>
  <parameter=todo_id>abc123</parameter>
  </function>

  # Mark multiple todos pending in ONE call
  <function=mark_todo_pending>
  <parameter=todo_ids>["abc123", "def456"]</parameter>
  </function>
    </examples>
  </tool>

  <tool name="delete_todo">
    <description>Delete one or multiple todos in a single call.</description>
    <details>Use this to remove todos that are no longer relevant. Supports bulk deletion to save tool calls.</details>
    <parameters>
      <parameter name="todo_id" type="string" required="false">
        <description>ID of a single todo to delete</description>
      </parameter>
      <parameter name="todo_ids" type="string" required="false">
        <description>Delete multiple todos at once. JSON array of IDs: ["abc123", "def456"] or comma-separated: "abc123, def456"</description>
      </parameter>
    </parameters>
    <returns type="Dict[str, Any]">
      <description>Response containing: - deleted: List of deleted IDs - deleted_count: Number deleted - todos: Remaining todos - errors: Any failures</description>
    </returns>
    <examples>
  # Delete single todo
  <function=delete_todo>
  <parameter=todo_id>abc123</parameter>
  </function>

  # Delete multiple todos in ONE call
  <function=delete_todo>
  <parameter=todo_ids>["abc123", "def456", "ghi789"]</parameter>
  </function>
    </examples>
  </tool>
</tools>
