write_file
Creates or updates markdown vault notes after validating frontmatter against the schema; refuses invalid writes and uses expected ETags for conditional, conflict-safe writes.
Instructions
WRITE — validates the frontmatter against the vault schema and refuses the write if it does not hold. The body is free: a new note, or one that already follows its kind's template (see template), that differs from the template is written, and the answer carries a warning naming what it lacks. Stamps updated with today and fills date when missing. Pass expected_etag from read_file to make the write conditional, or "*" to create a note that must not exist yet. .vault/styles/<kind>.md writes a kind's style as it is, without those checks; one whose first line <!-- style-version: N --> is older than the stored one is refused, and the user's .vault/styles/<kind>.override.md is never written.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"content": "<content>"
},
"name": "write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| vault | No | ||
| content | Yes | ||
| expected_etag | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |