> ## Documentation Index
> Fetch the complete documentation index at: https://docs.the40thieves.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# write_note

> Create, overwrite, or upsert a note.

Create, overwrite, or upsert a note. Optional prev\_hash gives compare-and-swap; overwriting a non-empty note requires confirmation. Set provenance: "agent\_synthesis" when the content is a derived/inferred conclusion an agent produced (not directly stated in any single source) rather than authored/copied text — this routes the content through a poison scan before the write lands (rejected outright on high risk) and surfaces the assessment in the result; also add source: agent-synthesis to the note's own frontmatter by convention. response\_format=concise acknowledges with \{vault, path, content\_hash} only (plus quality\_warning, poison\_assessment or redactions when they carry something).

| | |
| - | - |
| **Domain** | notes |
| **Scopes** | `write:notes` |
| **Access** | write |
| **Tags** | `writes`, `destructive`, `hitl`, `domain:notes` |
| **Profile** | core, full |

## Annotations

| Annotation | Value |
| - | - |
| Read-only | no |
| Destructive | yes |
| Idempotent | no |
| Accepts an idempotency key | yes |

`Idempotent` is the advisory MCP `idempotentHint`. `Destructive` is also `yes` for a tool that
asks for confirmation only on some calls.

## Confirmation (human in the loop)

The handler asks for confirmation only when a call crosses a boundary (for example an overwrite, a folder-boundary crossing or a bulk-cost floor); other calls need none.

* The confirmation binds to the vault paths the call names, which are also checked against the folder ACL.

## Input

| Parameter | Type | Required | Default | Description |
| - | - | - | - | - |
| `vault` | `string` | | — | Vault id. May be omitted when only one vault is available. length 1–64; pattern `^[a-z0-9_-]+$` |
| `path` | `string` | yes | — | length 1–1024 |
| `content` | `string` | yes | — | — |
| `mode` | `enum` | | `"create"` | "create" (default) fails if the note exists; "overwrite" replaces an existing note; "upsert" creates or replaces. There is no overwrite flag; to add to an existing note use append\_note. One of: `"create"`, `"overwrite"`, `"upsert"` |
| `prev_hash` | `string` | | — | — |
| `options` | `object` | | `{}` | — |
| `options.idempotency_key` | `string` | | — | length 1–128 |
| `options.create_dirs` | `boolean` | | `true` | — |
| `elicit_token` | `string` | | — | pattern `^[a-f0-9]{32}$` |
| `provenance` | `enum` | | `"authored"` | One of: `"authored"`, `"agent_synthesis"` |
| `response_format` | `enum` | | — | concise returns only the high-signal fields; detailed (the shipped default) returns the full payload. Errors and safety warnings are never trimmed. When omitted, the server's tools.defaults.responseFormat applies. One of: `"concise"`, `"detailed"` |
| `verbosity` | `enum` | | — | Legacy alias for response\_format: terse = concise, full = detailed. One of: `"full"`, `"terse"` |

## Output

| Field | Type | Always present | Description |
| - | - | - | - |
| `vault` | `string` | yes | — |
| `path` | `string` | yes | — |
| `created` | `boolean` | | — |
| `mode_used` | `enum` | | One of: `"create"`, `"overwrite"` |
| `content_hash` | `string` | yes | — |
| `prev_hash` | `string \| null` | | — |
| `bytes_written` | `number` | | — |
| `quality_warning` | `object \| null` | | — |
| `quality_warning.flags` | `string[]` | with parent | — |
| `quality_warning.computed_at` | `number` | with parent | — |
| `poison_assessment` | `object \| null` | | — |
| `poison_assessment.risk` | `enum` | with parent | One of: `"none"`, `"suspect"`, `"high"` |
| `poison_assessment.signals` | `string[]` | with parent | — |
| `redactions` | `integer` | | range ≥ 0 |
| `conventions` | `object` | | — |
| `conventions.warnings` | `object[]` | | — |
| `conventions.warnings_omitted` | `integer` | | range ≥ -9007199254740991 |
| `conventions.file_warnings` | `object[]` | | — |
| `conventions.file_warnings_omitted` | `integer` | | range ≥ -9007199254740991 |

## Related tools

Other tools in the `notes` domain: [`append_note`](https://docs.the40thieves.dev/reliquary-tc/tools/reference/append_note/), [`bulk_create_notes`](https://docs.the40thieves.dev/reliquary-tc/tools/reference/bulk_create_notes/), [`bulk_move_notes`](https://docs.the40thieves.dev/reliquary-tc/tools/reference/bulk_move_notes/), [`copy_note`](https://docs.the40thieves.dev/reliquary-tc/tools/reference/copy_note/), [`delete_note`](https://docs.the40thieves.dev/reliquary-tc/tools/reference/delete_note/), [`fetch`](https://docs.the40thieves.dev/reliquary-tc/tools/reference/fetch/), [`get_provenance`](https://docs.the40thieves.dev/reliquary-tc/tools/reference/get_provenance/), [`list_notes`](https://docs.the40thieves.dev/reliquary-tc/tools/reference/list_notes/), [`list_snapshots`](https://docs.the40thieves.dev/reliquary-tc/tools/reference/list_snapshots/), [`move_note`](https://docs.the40thieves.dev/reliquary-tc/tools/reference/move_note/), [`note_exists`](https://docs.the40thieves.dev/reliquary-tc/tools/reference/note_exists/), [`patch_note`](https://docs.the40thieves.dev/reliquary-tc/tools/reference/patch_note/), [`read_note`](https://docs.the40thieves.dev/reliquary-tc/tools/reference/read_note/), [`read_notes`](https://docs.the40thieves.dev/reliquary-tc/tools/reference/read_notes/), [`read_resources`](https://docs.the40thieves.dev/reliquary-tc/tools/reference/read_resources/), [`read_snapshot`](https://docs.the40thieves.dev/reliquary-tc/tools/reference/read_snapshot/), [`restore_note`](https://docs.the40thieves.dev/reliquary-tc/tools/reference/restore_note/), [`snapshot_note`](https://docs.the40thieves.dev/reliquary-tc/tools/reference/snapshot_note/).

Back to the [tool catalog](https://docs.the40thieves.dev/reliquary-tc/tools/tool-catalog.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.