write_file
Create or update files in Obsidian vaults with optional frontmatter and directory creation.
Instructions
Write or update a file in a vault
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": {
"vault": "<vault>",
"filepath": "<filepath>",
"content": "<content>"
},
"name": "write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vault | Yes | Vault identifier | |
| filepath | Yes | Path to the file | |
| content | Yes | File content | |
| frontmatter | No | Optional YAML frontmatter | |
| createDirs | No | Create parent directories (default: true) | |
| expectedModTime | No | Expected modification time for conflict detection |