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)
{
"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_text | write | Append text to the end of the document body. |
apply_doc_bullets | write | Convert paragraphs in a range into a bulleted or numbered list. |
clear_doc | destructive | Delete all content from the document body. |
create_doc_footer | write | Create a document footer and optionally fill it with initial text. |
create_doc_header | write | Create a document header and optionally fill it with initial text. |
create_doc_in_folder | write | Create a new blank Google Doc inside a Drive folder. |
delete_doc_range | destructive | Delete a content range by index. |
doc_batch_update | destructive | Escape hatch: apply a raw Docs API batchUpdate Requests list. |
find_doc_text | read | Find every occurrence of a text substring and return its index ranges. |
get_doc | read | Get the full Docs API document resource (body, headers, styles, revisionId). |
get_doc_metadata | read | Get document title, revisionId, and documentStyle. |
get_doc_text | read | Extract the plain text of the document body, table cells included (headers and footers are not). |
insert_doc_heading | write | Convenience: insert a line of text and apply HEADING_{level}. |
insert_doc_image | write | Insert an inline image from a public URL. |
insert_doc_page_break | write | Insert a page break. |
insert_doc_section_break | write | Insert a section break (Docs adds a newline before it; not allowed inside a table, header or footer). |
insert_doc_table | write | Insert an empty table. |
insert_doc_text | write | Insert text at a specific index. |
remove_doc_bullets | write | Remove bullet/number glyphs from paragraphs in a range. |
rename_doc | write | Rename a Google Doc via the Drive API. |
replace_doc_text | destructive | Find and replace text across the entire document. |
set_doc_table_cell_text | destructive | Replace the text content of a specific table cell. |
style_doc_text_by_match | write | Find every occurrence of `needle` and apply the given text style. |
update_doc_document_style | write | Update document-level properties: margins, page size, background. |
update_doc_paragraph_style | write | Apply paragraph-level style to a range. |
update_doc_text_style | write | Apply character-level text styles to an index range (from find_doc_text or get_doc). |
write_doc_structured | destructive | Build a document from a list of semantic blocks in ONE call. |