Google 文档

在你的 SellerSheet 工作区里创建和编辑 Google 文档——报告、SOP、简报。

一句话

write_doc_structured 一次调用写出整篇文档——标题、段落、列表、表格。其他文档工具让 AI 精细控制文字、表格、图片、页眉页脚和样式。

日常工作中

创建文档

create_doc_in_folder 在你的工作区文件夹里创建文档;get_doc 和 get_doc_text 读取文档。

一次调用写完

write_doc_structured 接收一组内容块并按顺序写入——把一周的数据变成报告最快的方式。

精细编辑

find_doc_text、replace_doc_text、insert_doc_text 和 delete_doc_range 修改文字;insert_doc_table、set_doc_table_cell_text 和 insert_doc_image 添加表格和图片;update_doc_text_style 和 update_doc_paragraph_style 设置样式。其他需求用 doc_batch_update 兜底。

可以这样问

“在我的 reports 文件夹里创建一份周报文档。”

“插入一个 3 列表格,汇总我表现最好的 ASIN。”

写文档的两种调用方式

同一个工具、同样的参数——通过 AI 客户端,或者从你自己的代码。

MCP——你要一份周报。AI 先取数据,再调用 write_doc_structured。

在 AI 客户端中(MCP)

tools/call
{
  "name": "write_doc_structured",
  "arguments": {
    "documentId": "<your document id>",
    "blocks": [
      {
        "type": "heading",
        "text": "Week 42",
        "level": 1
      },
      {
        "type": "paragraph",
        "text": "Sales rose 12% week over week."
      }
    ]
  }
}

在代码中(Tool API)

curl -X POST https://api.sellersheetai.com/api/v1/tools/write_doc_structured \
  -H "Authorization: Bearer $SELLERSHEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"documentId":"<your document id>","blocks":[{"type":"heading","text":"Week 42","level":1},{"type":"paragraph","text":"Sales rose 12% week over week."}]}'
抢先体验 — 如需 Tool API 访问,请 联系我们.

这些工具会改动你的文档

写入工具改动的是你指定的文档——不会改动你的亚马逊账户。文档必须属于你:你拥有、共享给你的 Google 账号,或在你的工作区内。

本页用到的工具

构建时从工具目录读取,每个工具带有自己的权限标签。

工具权限作用(英文)
append_doc_textwriteAppend text to the end of the document body.
apply_doc_bulletswriteConvert paragraphs in a range into a bulleted or numbered list.
clear_docdestructiveDelete all content from the document body.
create_doc_footerwriteCreate a document footer and optionally fill it with initial text.
create_doc_headerwriteCreate a document header and optionally fill it with initial text.
create_doc_in_folderwriteCreate a new blank Google Doc inside a Drive folder.
delete_doc_rangedestructiveDelete a content range by index.
doc_batch_updatedestructiveEscape hatch: apply a raw Docs API batchUpdate Requests list.
find_doc_textreadFind every occurrence of a text substring and return its index ranges.
get_docreadGet the full Docs API document resource (body, headers, styles, revisionId).
get_doc_metadatareadGet document title, revisionId, and documentStyle.
get_doc_textreadExtract the plain text of the document body, table cells included (headers and footers are not).
insert_doc_headingwriteConvenience: insert a line of text and apply HEADING_{level}.
insert_doc_imagewriteInsert an inline image from a public URL.
insert_doc_page_breakwriteInsert a page break.
insert_doc_section_breakwriteInsert a section break (Docs adds a newline before it; not allowed inside a table, header or footer).
insert_doc_tablewriteInsert an empty table.
insert_doc_textwriteInsert text at a specific index.
remove_doc_bulletswriteRemove bullet/number glyphs from paragraphs in a range.
rename_docwriteRename a Google Doc via the Drive API.
replace_doc_textdestructiveFind and replace text across the entire document.
set_doc_table_cell_textdestructiveReplace the text content of a specific table cell.
style_doc_text_by_matchwriteFind every occurrence of `needle` and apply the given text style.
update_doc_document_stylewriteUpdate document-level properties: margins, page size, background.
update_doc_paragraph_stylewriteApply paragraph-level style to a range.
update_doc_text_stylewriteApply character-level text styles to an index range (from find_doc_text or get_doc).
write_doc_structureddestructiveBuild a document from a list of semantic blocks in ONE call.

常见问题

数据从哪里来?

来自亚马逊工具和你的同步报表——例如销售分析和同步报表。

本页内容

操作

查看 Markdown

询问助手

问 ChatGPT问 Claude