跳到正文
所有工具

word_create

文档 · macOS · Windows

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

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

macOS

用途

在 `path` 创建一个新的 Word(.docx)文档,包含给定的文本内容(以及可选的、渲染为标题的 title)。需要 confirm=true——不传时,返回将要写入内容的预览,而不创建文件。该路径必须是 LMCP 可写入的位置;Desktop/Documents/Downloads 可能需要一次性的“文件和文件夹”授权(System Settings → Privacy & Security → Files and Folders)。返回 {created, path}。对于 OneDrive 或 Google Drive 路径,请使用 onedrive_write_file / gdrive_write_file;要向现有文档追加内容请使用 word_append,要读取请使用 word_read。

必填输入

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

权限与确认

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

英文规范技术架构 — macOS
{
  "properties": {
    "confirm": {
      "description": "Must be true to create",
      "type": "boolean"
    },
    "content": {
      "description": "Document text content",
      "type": "string"
    },
    "overwrite": {
      "description": "Required (with confirm) to REPLACE a file that already exists at path. Without it an existing file is never touched.",
      "type": "boolean"
    },
    "path": {
      "description": "Output path for the .docx file",
      "type": "string"
    },
    "title": {
      "description": "Document title (optional)",
      "type": "string"
    }
  },
  "required": [
    "path",
    "content"
  ],
  "type": "object"
}

文档示例

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

{
  "confirm": false,
  "content": "Meeting agenda: review the launch checklist.",
  "path": "/Users/demo/Documents/meeting-notes.docx"
}

Windows

用途

创建包含指定内容的新 Word(.docx)文档。只有在 overwrite=true 时才会替换 path 处的现有文件。

必填输入

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

权限与确认

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

英文规范技术架构 — Windows
{
  "properties": {
    "confirm": {
      "description": "Must be true to create the file",
      "type": "boolean"
    },
    "content": {
      "description": "Text content. Each line becomes a paragraph.",
      "type": "string"
    },
    "overwrite": {
      "description": "Required (true) to REPLACE a file that already exists at path. Without it an existing file is refused, never replaced.",
      "type": "boolean"
    },
    "path": {
      "description": "Absolute path for the new .docx file",
      "type": "string"
    },
    "title": {
      "description": "Document title (optional)",
      "type": "string"
    }
  },
  "required": [
    "path",
    "content"
  ],
  "type": "object"
}

文档示例

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

{
  "confirm": false,
  "content": "Meeting agenda: review the launch checklist.",
  "path": "C:\\Users\\demo\\Documents\\meeting-notes.docx"
}