diagnostics#

Diagnostic commands inspect the index for inconsistencies without modifying it. They are intended to help clients surface problems to the user in real time.


Scans the links recorded for a given note and returns any that point to a slug that does not exist in the index. Intended to be called after a note is saved or opened so clients can display inline warnings.

Method: diagnostics/links

Params:

FieldTypeDescription
pathstringAbsolute path to the note to check.

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "diagnostics/links",
  "params": {
    "path": "~/vault/worklogs/dendrite-is-helping-my-workflow.md"
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "noteId": "019063a1-...",
      "notePath": "~/vault/worklogs/dendrite-is-helping-my-workflow.md",
      "line": 7,
      "col": 3,
      "raw": "[[missing-note]]",
      "target": "missing-note",
      "message": "broken link: target 'missing-note' not found in index"
    }
  ]
}

An empty array means all links in the note resolve correctly. Each entry includes the position of the broken link within the file so the client can display it inline.

FieldTypeDescription
noteIdstringUUID of the note being checked.
notePathstringPath to the note being checked.
linenumberLine number of the broken link (1-based).
colnumberColumn offset of the broken link (0-based).
rawstringThe original link text as it appears in the file.
targetstringThe slug the link resolves to.
messagestringHuman-readable description of the problem.