SiYuan Document Tool icon

SiYuan Document Tool

Use this tool to create, read, list, and manage documents in the SiYuan knowledge base. Use "getContent" to read a document, "create" to write a new one, "listInNotebook" to browse, or "exportMd" for full markdown export.

Create

AI-generated

Summary

Create a new document with specified Markdown content at a given path within a specified notebook in SiYuan.

Inputs

  • Notebook ID (required) — The unique ID of the notebook where the new document will be created.
  • Document Path (required) — The path for the new document within the notebook; must start with '/' (e.g., '/My Notes/Topic').
  • Markdown Content (required) — The Markdown content that will populate the new document.

Output shape

a single JSON object representing the newly created document's data as returned by SiYuan API.

The output contains the details of the created document. If the operation succeeds without additional data, a success confirmation object is returned.

Examples

Example 1: Create a new document titled 'Meeting Notes' inside a notebook with ID 'abc123' at path '/Work/Meeting Notes', with markdown content '# Meeting Notes

Details...'

Set 'Notebook ID' to 'abc123', 'Document Path' to '/Work/Meeting Notes', and provide the markdown content to 'Markdown Content'.

Links

Discussion