---
title: "links.list: List links, tags and block ids — Note kit command — Kition"
description: "Lists the note's wikilinks, Markdown links, embeds, images, URLs, tags and block ids with their line and, for links, whether the target exists; `kinds` limits the list."
canonical: "https://developer.kition.ai/docs/kits/note/commands/links.list"
---

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

# links.list

**List links, tags and block ids.** Lists the note's wikilinks, Markdown links, embeds, images, URLs, tags and block ids with their line and, for links, whether the target exists; `kinds` limits the list.

- 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 |
| --- | --- | --- | --- |
| `kinds` | `("wikilink" \| "markdown" \| "embed" \| "image" \| "url" \| "tag" \| "blockId")[]` | no | Only these kinds; all by default. |

## Call through note_run

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

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

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `links` | `(object \| object \| object)[]` | yes | Links in document order, then tags, then block ids. |

```json
{
  "additionalProperties": false,
  "properties": {
    "links": {
      "description": "Links in document order, then tags, then block ids.",
      "items": {
        "oneOf": [
          {
            "additionalProperties": false,
            "properties": {
              "anchor": {
                "description": "The part after the file: #heading or #^block.",
                "type": "string"
              },
              "destination": {
                "description": "The destination as written.",
                "type": "string"
              },
              "index": {
                "description": "Which link of the line, from 0: what link.update takes.",
                "type": "integer"
              },
              "kind": {
                "description": "The link's kind; markdown includes reference links and <autolinks>.",
                "enum": [
                  "wikilink",
                  "markdown",
                  "embed",
                  "image",
                  "url"
                ],
                "type": "string"
              },
              "line": {
                "description": "Its line, from 1.",
                "type": "integer"
              },
              "state": {
                "description": "Whether its target exists: a file the host has, a heading or block of this note, a web address, or unknown when the host cannot say.",
                "enum": [
                  "resolved",
                  "missing",
                  "missing-anchor",
                  "external",
                  "unknown"
                ],
                "type": "string"
              },
              "text": {
                "description": "The text shown (a wikilink's alias).",
                "type": "string"
              }
            },
            "required": [
              "destination",
              "index",
              "kind",
              "line",
              "state"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "kind": {
                "description": "A tag.",
                "enum": [
                  "tag"
                ],
                "type": "string"
              },
              "line": {
                "description": "Its line, from 1.",
                "type": "integer"
              },
              "name": {
                "description": "The tag without #.",
                "type": "string"
              },
              "property": {
                "description": "True when it is written in the tags property.",
                "type": "boolean"
              }
            },
            "required": [
              "kind",
              "line",
              "name"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "id": {
                "description": "The id without the caret.",
                "type": "string"
              },
              "kind": {
                "description": "A block id.",
                "enum": [
                  "blockId"
                ],
                "type": "string"
              },
              "line": {
                "description": "Its line, from 1.",
                "type": "integer"
              }
            },
            "required": [
              "id",
              "kind",
              "line"
            ],
            "type": "object"
          }
        ]
      },
      "type": "array"
    }
  },
  "required": [
    "links"
  ],
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "kinds": {
      "description": "Only these kinds; all by default.",
      "items": {
        "enum": [
          "wikilink",
          "markdown",
          "embed",
          "image",
          "url",
          "tag",
          "blockId"
        ],
        "type": "string"
      },
      "type": "array"
    }
  },
  "type": "object"
}
```

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