{
  "name": "list_workstreams",
  "description": "List active child workstreams. By default returns your own non-closed children — the common \"what's still running?\" query. Pass `parent_ws_id` to list another parent's children. Pass `include_closed=true` to also return soft-closed rows. An explicit `state` filter (e.g. `state=\"closed\"`) overrides the default and returns matching terminal rows regardless of `include_closed`. Deleted rows never appear (delete cascades the row out of storage). Coordinator-kind workstreams are excluded.",
  "parameters": {
    "type": "object",
    "properties": {
      "parent_ws_id": {
        "type": "string",
        "description": "Parent workstream id. Omit to list the caller coordinator's own children; pass a value to list that parent's children."
      },
      "state": {
        "type": "string",
        "description": "Optional state filter — 'idle', 'thinking', 'running', 'attention', 'error', 'closed'. Matched exactly. An explicit state filter OVERRIDES the default-exclude-closed behavior, so state=\"closed\" still returns closed rows. Deleted workstreams are not stored, so 'deleted' is not a valid filter."
      },
      "skill": {
        "type": "string",
        "description": "Optional skill_id filter (template id, NOT skill name). Workstreams inherit skill_id at creation time."
      },
      "limit": {
        "type": "integer",
        "description": "Max rows to return. Default 100."
      },
      "include_closed": {
        "type": "boolean",
        "description": "When true, include soft-closed children in the default (no-state-filter) listing. Default false — \"what's still running?\" is the common coordinator query. Ignored when an explicit state filter is set. (Deleted children are not stored — they cascade out — so they never appear here regardless of this flag.)"
      }
    }
  },
  "coordinator": true,
  "auto_approve": true
}
