---
title: "tasks.list: List tasks — Note kit command — Kition"
description: "Lists the task items (`- [ ]`, `- [x]`) with line, text, done and block id, in the whole note or one section. Use it to get the line `task.toggle` takes."
canonical: "https://developer.kition.ai/docs/kits/note/commands/tasks.list"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/note/commands/tasks.list](https://developer.kition.ai/docs/kits/note/commands/tasks.list)

# tasks.list

**List tasks.** Lists the task items (`- [ ]`, `- [x]`) with line, text, done and block id, in the whole note or one section. Use it to get the line `task.toggle` takes.

- Kit: Note 0.3.0 (Markdown (.md)); reference: [Note kit commands](https://developer.kition.ai/docs/kits/note.md)
- Changes the document: no

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `heading` | `string[]` | no | The heading's path from the top, each element a heading's plain text, for example ["Plan", "Risks"]; or give line. |
| `line` | `integer` | no | The heading's line, from 1, instead of heading. |
| `section` | `string` | no | The section's id from outline.read ("section:3"), instead of heading or line: it names the same section after a rename or a move, for as long as the note stays open. |

## Call through note_run

```text
note_run {
  "path": "<file>.md",
  "steps": [{ "command": "tasks.list" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `heading`, `line`, `section`. note_run answers the step’s result in `completed[i].result`.

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `tasks` | `object[]` | yes | The tasks, in document order. |

```json
{
  "additionalProperties": false,
  "properties": {
    "tasks": {
      "description": "The tasks, in document order.",
      "items": {
        "additionalProperties": false,
        "properties": {
          "blockId": {
            "description": "Its block id, or null.",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "done": {
            "description": "Checked.",
            "type": "boolean"
          },
          "line": {
            "description": "The task's line, from 1: what task.toggle takes.",
            "type": "integer"
          },
          "text": {
            "description": "Its text, without the box and block id.",
            "type": "string"
          }
        },
        "required": [
          "blockId",
          "done",
          "line",
          "text"
        ],
        "type": "object"
      },
      "type": "array"
    }
  },
  "required": [
    "tasks"
  ],
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "heading": {
      "description": "The heading's path from the top, each element a heading's plain text, for example [\"Plan\", \"Risks\"]; or give line.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "line": {
      "description": "The heading's line, from 1, instead of heading.",
      "type": "integer"
    },
    "section": {
      "description": "The section's id from outline.read (\"section:3\"), instead of heading or line: it names the same section after a rename or a move, for as long as the note stays open.",
      "type": "string"
    }
  },
  "type": "object"
}
```

Generated from kition-sdk packages/script/kits/note.ts and the kit itself (kition-note@69e14d9).
