---
title: "note.write: Write the whole note — Note kit command — Kition"
description: "Replaces the whole note with `markdown` as one undo step, rewriting only the lines that differ. Use it to write a new note; prefer section, block and text commands to change part of one."
canonical: "https://developer.kition.ai/docs/kits/note/commands/note.write"
---

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

# note.write

**Write the whole note.** Replaces the whole note with `markdown` as one undo step, rewriting only the lines that differ. Use it to write a new note; prefer section, block and text commands to change part of one.

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

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `markdown` | `string` | yes | The note's whole new Markdown; only the lines that differ are changed. |

## Call through note_run

```text
note_run {
  "path": "<file>.md",
  "steps": [{ "command": "note.write", "params": { "markdown": <string> } }]
}
```

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

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `changed` | `boolean` | yes | Whether the note's text changed (false when it already read so). |

```json
{
  "additionalProperties": false,
  "properties": {
    "changed": {
      "description": "Whether the note's text changed (false when it already read so).",
      "type": "boolean"
    }
  },
  "required": [
    "changed"
  ],
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "markdown": {
      "description": "The note's whole new Markdown; only the lines that differ are changed.",
      "type": "string"
    }
  },
  "required": [
    "markdown"
  ],
  "type": "object"
}
```

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