跳到正文
所有工具

obsidian_write_note

Obsidian · macOS · Windows

效果: 写入. 状态: 受限可用.

“受限可用”表示工具可能取决于版本、平台、权限、账户或配置,并不表示它在所有安装中都已启用。

macOS

用途

在 Obsidian 保险库中写入一篇 Markdown 笔记。mode="create" 写入新笔记(缺失的文件夹会被创建);mode="append" 将 `content` 添加到现有笔记的末尾。未传 confirm 时返回预览,不写入任何内容;传入 confirm=true 才会写入。现有笔记绝不会被替换,Obsidian 的设置文件夹也绝不会被写入。

必填输入

输入名称会严格保持工具要求的形式。下方可展开的架构中保留英文规范技术定义。

权限与确认

架构声明了明确的确认参数。请检查预览,并按此平台的契约授权实际操作。

英文规范技术架构 — macOS
{
  "properties": {
    "confirm": {
      "description": "Must be true to write. Without it the call returns a preview.",
      "type": "boolean"
    },
    "content": {
      "description": "Markdown text to write.",
      "type": "string"
    },
    "mode": {
      "description": "create: a new note. append: add to the end of an existing note.",
      "enum": [
        "create",
        "append"
      ],
      "type": "string"
    },
    "path": {
      "description": "Path of the note inside the vault, like Projects/Plan.md (.md is added when missing).",
      "type": "string"
    },
    "vault": {
      "description": "Vault name or id from obsidian_list_vaults. Optional when there is only one vault.",
      "type": "string"
    }
  },
  "required": [
    "path",
    "content",
    "mode"
  ],
  "type": "object"
}

文档示例

obsidian_write_note 的文档示例。请勿执行此示例。所示参数属于虚构数据集;在实际调用前,请解析真实标识符并获得授权。

{
  "confirm": false,
  "content": "## Planning meeting\n\n- Can we review the launch checklist on Tuesday?",
  "mode": "create",
  "path": "Meetings/Planning meeting.md",
  "vault": "Demo Vault"
}

Windows

用途

在 Obsidian 保险库中写入一篇 Markdown 笔记。mode="create" 写入新笔记(缺失的文件夹会被创建);mode="append" 将 `content` 添加到现有笔记的末尾。未传 confirm 时返回预览,不写入任何内容;传入 confirm=true 才会写入。现有笔记绝不会被替换,Obsidian 的设置文件夹也绝不会被写入。

必填输入

输入名称会严格保持工具要求的形式。下方可展开的架构中保留英文规范技术定义。

权限与确认

架构声明了明确的确认参数。请检查预览,并按此平台的契约授权实际操作。

英文规范技术架构 — Windows
{
  "properties": {
    "confirm": {
      "description": "Must be true to write. Without it the call returns a preview.",
      "type": "boolean"
    },
    "content": {
      "description": "Markdown text to write.",
      "type": "string"
    },
    "mode": {
      "description": "create: a new note. append: add to the end of an existing note.",
      "enum": [
        "create",
        "append"
      ],
      "type": "string"
    },
    "path": {
      "description": "Path of the note inside the vault, like Projects/Plan.md (.md is added when missing).",
      "type": "string"
    },
    "vault": {
      "description": "Vault name or id from obsidian_list_vaults. Optional when there is only one vault.",
      "type": "string"
    }
  },
  "required": [
    "path",
    "content",
    "mode"
  ],
  "type": "object"
}

文档示例

obsidian_write_note 的文档示例。请勿执行此示例。所示参数属于虚构数据集;在实际调用前,请解析真实标识符并获得授权。

{
  "confirm": false,
  "content": "## Planning meeting\n\n- Can we review the launch checklist on Tuesday?",
  "mode": "create",
  "path": "Meetings/Planning meeting.md",
  "vault": "Demo Vault"
}