@wecom/wecom-openclaw-plugin 2026.5.14 → 2026.5.25-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wecom/wecom-openclaw-plugin",
3
- "version": "2026.5.14",
3
+ "version": "2026.5.25-beta.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: wecom-doc
3
- description: 企业微信文档管理技能。支持企业微信文档、智能表格和智能文档(原名智能主页)的管理。具体能力:(1) 获取文档或智能表格的完整内容,以 Markdown 格式导出 (2) 新建文档或智能表格 (3) 用 Markdown 覆写文档内容 (4) 创建智能文档,将本地 Markdown 文件发布为智能文档 (5) 导出智能文档内容为 Markdown 文件。
3
+ description: 企业微信文档管理技能。支持企业微信文档、表格(在线表格)、智能表格和智能文档(原名智能主页)的管理。具体能力:(1) 以 Markdown 格式获取文档/表格/智能表格的完整内容 (2) 新建文档或智能表格 (3) 用 Markdown 覆写文档内容 (4) 创建智能文档,将本地 Markdown 文件发布为智能文档 (5) 导出智能文档内容为 Markdown 文件。用户提及 `https://doc.weixin.qq.com/xxxx` 格式的URL链接时,需要使用此技能。
4
4
  ---
5
5
 
6
6
  # 企业微信文档管理
@@ -15,19 +15,22 @@ description: 企业微信文档管理技能。支持企业微信文档、智能
15
15
 
16
16
  ## URL 品类识别与接口路由
17
17
 
18
- 企业微信文档有三种品类,**URL 格式不同,读取内容所用的接口也不同**,切勿混用:
18
+ 企业微信文档有四种品类,**URL 格式不同,读取内容所用的接口也不同**,切勿混用。其中**表格(在线表格)与智能表格是两类不同品类**,请通过 URL 严格区分:
19
19
 
20
20
  | URL 模式 | 品类 | 读取内容接口 |
21
21
  |---|---|---|
22
22
  | `https://doc.weixin.qq.com/doc/*` | **文档**(doc_type=3) | `get_doc_content` |
23
- | `https://doc.weixin.qq.com/smartsheet/*` | **智能表格**(doc_type=10) | `get_doc_content` |
23
+ | `https://doc.weixin.qq.com/sheet/*` | **表格 / 在线表格** | `get_doc_content` |
24
+ | `https://doc.weixin.qq.com/smartsheet/*` | **智能表格**(doc_type=10) | `smartsheet_get_sheet` → `smartsheet_get_records` |
24
25
  | `https://doc.weixin.qq.com/smartpage/*` | **智能文档**(原名智能主页) | `smartpage_export_task` → `smartpage_get_export_result` |
25
26
 
26
27
  **判断规则**:
27
28
  - URL 路径以 `/doc/*` 开头 → 文档 → 用 `get_doc_content`
28
- - URL 路径以 `/smartsheet/*` 开头 → 智能表格 → 用 `get_doc_content`
29
+ - URL 路径以 `/sheet/*` 开头 → 表格(在线表格) → 用 `get_doc_content`
30
+ - URL 路径以 `/smartsheet/*` 开头 → 智能表格 → 用 `smartsheet_get_sheet`
29
31
  - URL 路径以 `/smartpage/*` 开头 → 智能文档(原名智能主页) → 用 `smartpage_export_task`
30
32
 
33
+ > ⚠️ **表格 ≠ 智能表格**:二者是不同品类(`/sheet/` vs `/smartsheet/`)。
31
34
 
32
35
  ## 调用方式
33
36
 
@@ -51,27 +54,30 @@ description: 企业微信文档管理技能。支持企业微信文档、智能
51
54
  | errcode | errmsg | 含义 | 处理方式 |
52
55
  |---------|--------|------|----------|
53
56
  | `851002` | `incompatible doc type` | 文档品类与所调用的接口不匹配 | 根据文档 URL 重新确认品类(参见上方「URL 品类识别与接口路由」表),然后使用该品类对应的正确接口重试 |
54
- | `851003` | `no authority` | 无权限调用该接口,**智能表格写入场景**下通常是企业可见范围 > 10 人的规模限制 | 若发生在需要写入数据的场景,引导用户走 Webhook 兜底方案,详见 [webhook-fallback.md](../wecom-smartsheet/references/webhook-fallback.md);其他接口则按权限问题排查 |
57
+ | `851003` | `no authority` | 无文档权限。在编辑场景,通常是因为机器人不允许编辑由企业成员创建的文档。在**智能表格写入场景**下,若该报错发生在 `smartsheet_add_records` / `smartsheet_update_records`,可引导用户走 Webhook 兜底方案,详见 [webhook-fallback.md](../wecom-smartsheet/references/webhook-fallback.md);其他接口则按权限问题排查。注意 Webhook 只能更新通过 Webhook 写入的记录,人工创建的记录无法更新 |
55
58
 
56
59
  ---
57
60
 
58
61
  ## 文档
59
62
 
60
- 适用品类:文档(doc_type=3)和智能表格(doc_type=10)
61
- 适用 URL:`/doc/*`、`/smartsheet/*`
63
+ 适用品类:文档(doc_type=3)、表格(在线表格)和智能表格(doc_type=10)
64
+ 适用 URL:`/doc/*`、`/sheet/*`、`/smartsheet/*`
62
65
 
63
66
  适用场景:
64
- 1. 以 Markdown 格式导出获取文档完整内容(异步轮询)
67
+ 1. 以 Markdown 格式导出获取文档 / 表格 / 智能表格完整内容(异步轮询)
65
68
  2. 新建文档(doc_type=3)或智能表格(doc_type=10)
66
69
  3. 用 Markdown 格式覆写文档内容
67
70
 
68
71
  ### get_doc_content
69
72
 
70
- 获取文档完整内容数据,只能以 Markdown 格式返回。采用**异步轮询机制**:首次调用无需传 `task_id`,接口返回 `task_id`;若 `task_done` 为 false,需携带该 `task_id` 再次调用,直到 `task_done` 为 true 时返回完整内容。
73
+ 获取**文档 / 表格(在线表格) / 智能表格**的完整内容数据,统一以 Markdown 格式返回。采用**异步轮询机制**:首次调用无需传 `task_id`,接口返回 `task_id`;若 `task_done` 为 false,需携带该 `task_id` 再次调用,直到 `task_done` 为 true 时返回完整内容。
74
+
75
+ > 适用 URL:`/doc/*`、`/sheet/*`、`/smartsheet/*`。`/smartpage/*`(智能文档)不适用,请改用 `smartpage_export_task`。
71
76
 
72
77
  - 首次调用(不传 task_id):使用 `wecom_mcp` tool 调用 `wecom_mcp call doc get_doc_content '{"docid": "DOCID", "type": 2}'`
73
78
  - 轮询(携带上次返回的 task_id):使用 `wecom_mcp` tool 调用 `wecom_mcp call doc get_doc_content '{"docid": "DOCID", "type": 2, "task_id": "xxx"}'`
74
- - 或通过 URL:使用 `wecom_mcp` tool 调用 `wecom_mcp call doc get_doc_content '{"url": "https://doc.weixin.qq.com/doc/xxx", "type": 2}'`
79
+ - 通过 URL 读取文档:使用 `wecom_mcp` tool 调用 `wecom_mcp call doc get_doc_content '{"url": "https://doc.weixin.qq.com/doc/xxx", "type": 2}'`
80
+ - 通过 URL 读取表格(在线表格):使用 `wecom_mcp` tool 调用 `wecom_mcp call doc get_doc_content '{"url": "https://doc.weixin.qq.com/sheet/xxx", "type": 2}'`
75
81
 
76
82
  参见 [API 详情](references/get-doc-content.md)。
77
83
 
@@ -85,6 +91,7 @@ description: 企业微信文档管理技能。支持企业微信文档、智能
85
91
  **注意**:
86
92
  - docid 仅在创建时返回,需妥善保存。创建智能表格时默认包含一个子表
87
93
  - 智能表格(doc_type=10)的详细管理功能(子表、字段、数据记录等)已迁移到 `wecom-smartsheet` skill,请使用该 skill 进行高级操作
94
+ - 普通表格(在线表格,URL 含 `/sheet/`)本 skill **仅支持读取**(通过 `get_doc_content`),不支持创建
88
95
 
89
96
  参见 [API 详情](references/create-doc.md)。
90
97
 
@@ -145,11 +152,11 @@ description: 企业微信文档管理技能。支持企业微信文档、智能
145
152
 
146
153
  ## 典型工作流
147
154
 
148
- > **关键提示**:读取内容前先看 URL 判断品类。`/doc/` 或 `/smartsheet/` → `get_doc_content`;`/smartpage/` → `smartpage_export_task`。只有用户明确提到「智能文档」或「智能主页」时才走 smartpage 流程,其他文档场景一律使用企微文档接口。
155
+ > **关键提示**:读取内容前先看 URL 判断品类。`/doc/`、`/sheet/` 或 `/smartsheet/` → `get_doc_content`;`/smartpage/` → `smartpage_export_task`。只有用户明确提到「智能文档」或「智能主页」时才走 smartpage 流程,其他文档场景一律使用企微文档接口。
149
156
 
150
- ### 文档操作
157
+ ### 文档 / 表格 / 智能表格读取与文档编辑
151
158
 
152
- 1. **读取文档/智能表格内容**(URL 含 `/doc/` 或 `/smartsheet/`) → 使用 `wecom_mcp` tool 调用 `wecom_mcp call doc get_doc_content '{"docid": "DOCID", "type": 2}'`,若 `task_done` 为 false 则携带 `task_id` 继续轮询
159
+ 1. **读取文档 / 表格 / 智能表格**(URL 含 `/doc/`、`/sheet/` 或 `/smartsheet/`) → 使用 `wecom_mcp` tool 调用 `wecom_mcp call doc get_doc_content '{"docid": "DOCID", "type": 2}'`,或通过 URL(`/doc/*`、`/sheet/*`、`/smartsheet/*` 均适用):使用 `wecom_mcp` tool 调用 `wecom_mcp call doc get_doc_content '{"url": "https://doc.weixin.qq.com/sheet/xxx", "type": 2}'`,若 `task_done` 为 false 则携带 `task_id` 继续轮询
153
160
  2. **创建新文档** → 使用 `wecom_mcp` tool 调用 `wecom_mcp call doc create_doc '{"doc_type": 3, "doc_name": "文档名"}'`,保存返回的 docid
154
161
  3. **编辑文档** → 先 get_doc_content 了解当前内容,再 edit_doc_content 覆写
155
162
 
@@ -1,6 +1,6 @@
1
1
  # get_doc_content API
2
2
 
3
- 获取企业微信文档的完整内容数据,以 Markdown 格式返回。该接口采用异步轮询机制:首次调用无需传 task_id,接口会返回 task_id;若 task_done 为 false,需携带该 task_id 再次调用,直到 task_done 为 true 时返回完整内容。
3
+ 获取企业微信文档、表格的完整内容数据,以 Markdown 格式返回。该接口采用异步轮询机制:首次调用无需传 task_id,接口会返回 task_id;若 task_done 为 false,需携带该 task_id 再次调用,直到 task_done 为 true 时返回完整内容。
4
4
 
5
5
  ## 技能定义
6
6
 
@@ -72,6 +72,10 @@ description: 企业微信智能表格管理技能。提供智能表格的结构
72
72
 
73
73
  在添加字段前,请先参阅所有字段类型和定义 [字段类型参考](references/smartsheet-field-types.md)。
74
74
 
75
+ > 注意:如果是首次创建表并调用这个方法添加字段的情况下,调用本接口前,你必须确认已完成以下操作,否则会多出一个无用的默认列:
76
+ > 1. 已调用 smartsheet_get_fields 查看子表现有字段(新子表会自带一个默认文本字段)
77
+ > 2. 已调用 smartsheet_update_fields 将该默认字段重命名为你需要的第一个字段名 然后在本接口中只传入剩余的字段(不包含第一个字段)。
78
+
75
79
  ### smartsheet_update_fields
76
80
 
77
81
  更新字段标题。**只能改名,不能改类型**(field_type 必须传原始类型)。field_title 不能更新为原值。
@@ -112,7 +116,7 @@ description: 企业微信智能表格管理技能。提供智能表格的结构
112
116
  > 图片字段示例:`"封面": [{"image_path": "/path/to/img.png", "title": "图片标题"}]`
113
117
  > 文件字段示例:`"文件": [{"file_path": "/path/to/file.pdf"}]`
114
118
 
115
- > ⚠️ 若返回 `errcode: 851003` 或 `errmsg` 包含 `no authority`(通常是企业可见范围 > 10 人的规模限制),切换到 Webhook 兜底方案,详见 [webhook-fallback.md](references/webhook-fallback.md)。
119
+ > ⚠️ 若返回 `errcode: 851003` 或 `errmsg` 包含 `no authority`,无文档权限。在编辑场景,通常是因为机器人不允许编辑由企业成员创建的文档。在**智能表格写入场景**下,若该报错发生在 `smartsheet_add_records` / `smartsheet_update_records`,可引导用户走 Webhook 兜底方案,详见 [webhook-fallback.md](references/webhook-fallback.md)。注意 Webhook 只能更新通过 Webhook 写入的记录,人工创建的记录无法更新。
116
120
 
117
121
  ### smartsheet_update_records
118
122
 
@@ -132,7 +136,7 @@ description: 企业微信智能表格管理技能。提供智能表格的结构
132
136
  > 图片字段示例:`"封面": [{"image_path": "/path/to/img.png", "title": "图片标题"}]`
133
137
  > 文件字段示例:`"文件": [{"file_path": "/path/to/file.pdf"}]`
134
138
 
135
- > ⚠️ 若返回 `errcode: 851003` 或 `errmsg` 包含 `no authority`(通常是企业可见范围 > 10 人的规模限制),切换到 Webhook 兜底方案,详见 [webhook-fallback.md](references/webhook-fallback.md)。注意 Webhook 只能更新通过 Webhook 写入的记录,人工创建的记录无法更新。
139
+ > ⚠️ 若返回 `errcode: 851003` 或 `errmsg` 包含 `no authority`,无文档权限。在编辑场景,通常是因为机器人不允许编辑由企业成员创建的文档。在**智能表格写入场景**下,若该报错发生在 `smartsheet_add_records` / `smartsheet_update_records`,可引导用户走 Webhook 兜底方案,详见 [webhook-fallback.md](references/webhook-fallback.md)。注意 Webhook 只能更新通过 Webhook 写入的记录,人工创建的记录无法更新。
136
140
 
137
141
  ### smartsheet_delete_records
138
142
 
@@ -156,7 +160,7 @@ description: 企业微信智能表格管理技能。提供智能表格的结构
156
160
  1. **读取数据** → 使用 `wecom_mcp` tool 调用 `wecom_mcp call doc smartsheet_get_records '{"docid":"DOCID","sheet_id":"SHEETID"}'`
157
161
  2. **写入数据** → 先 `smartsheet_get_fields` 了解列类型 → 若涉及成员(USER)字段,先通过 `wecom-contact` 的 `get_userlist` 查找人员 userid → `smartsheet_add_records` 写入
158
162
  3. **更新数据** → 先 `smartsheet_get_records` 获取 record_id → 若涉及成员(USER)字段,先通过 `wecom-contact` 的 `get_userlist` 查找人员 userid → `smartsheet_update_records` 更新
159
- 4. **写入失败 fallback** → 第 2/3 步返回 `errcode: 851003` / `no authority`(通常是企业可见范围 > 10 人的规模限制)时 → 请用户临时提供目标表的 Webhook 地址 + schema 示例 JSON(不保存到本地)→ 按 [webhook-fallback.md](references/webhook-fallback.md) 构造请求体发送
163
+ 4. **写入失败 fallback** → 第 2/3 步返回 `errcode: 851003` / `no authority`,无文档权限。在编辑场景,通常是因为机器人不允许编辑由企业成员创建的文档。在**智能表格写入场景**下,若该报错发生在 `smartsheet_add_records` / `smartsheet_update_records`,可引导用户走 Webhook 兜底方案,详见 [webhook-fallback.md](references/webhook-fallback.md)。注意 Webhook 只能更新通过 Webhook 写入的记录,人工创建的记录无法更新
160
164
  5. 若涉及**图片(IMAGE)或文件(ATTACHMENT)**字段,**必须且只能**直接在 cell value 中传入本地路径(`image_path` / `file_path`)。**严禁**调用 `upload_doc_image`、`upload_doc_file` 或任何上传接口,**严禁**进行 base64 编码——无论文件大小、无论 API 返回何种错误,均不得绕过此规则。若返回错误,直接将错误码和错误信息告知用户,不得尝试其他上传方式。传入格式参考 [单元格值格式参考](references/smartsheet-cell-value-formats.md)。
161
165
  6. **删除数据** → 先 `smartsheet_get_records` 确认 record_id → `smartsheet_delete_records` 删除
162
166
 
@@ -1,38 +1,79 @@
1
1
  # smartsheet_get_records API
2
2
 
3
- 查询智能表格中指定子表的记录信息。只支持获取全部记录。支持通过 docid 或文档 URL 定位文档,二者传入其一即可。
3
+ 查询智能表格中指定子表的记录信息,支持分页读取。支持通过 docid 或文档 URL 定位文档,二者传入其一即可。
4
4
 
5
5
  ## 技能定义
6
6
 
7
7
  ```json
8
8
  {
9
- "name": "smartsheet_get_records",
10
- "description": "查询智能表格中指定子表的记录信息。只支持获取全部记录。支持通过 docid 或文档 URL 定位文档,二者传入其一即可。",
11
- "inputSchema": {
12
- "properties": {
13
- "docid": {
14
- "description": "文档的 docid,与 url 二选一传入",
15
- "title": "Docid",
16
- "type": "string"
17
- },
18
- "url": {
19
- "description": "文档的访问链接,与 docid 二选一传入",
20
- "title": "URL",
21
- "type": "string"
22
- },
23
- "sheet_id": {
24
- "description": "子表的 sheet_id,用于指定要查询的智能表格中的哪个子表",
25
- "title": "Sheet Id",
26
- "type": "string"
27
- }
28
- },
29
- "oneOf": [
30
- { "required": ["docid", "sheet_id"] },
31
- { "required": ["url", "sheet_id"] }
9
+ "name": "smartsheet_get_records",
10
+ "description": "查询智能表格中指定子表的记录信息。支持分页查询(cursor + limit),不填 cursor 从第一行开始。支持通过 docid 或文档 URL 定位文档,二者传入其一即可。",
11
+ "inputSchema": {
12
+ "properties": {
13
+ "cursor": {
14
+ "anyOf": [
15
+ {
16
+ "type": "string"
17
+ },
18
+ {
19
+ "type": "null"
20
+ }
21
+ ],
22
+ "default": null,
23
+ "description": "查询游标,不填代表从第一行记录开始查询",
24
+ "title": "Cursor"
25
+ },
26
+ "docid": {
27
+ "anyOf": [
28
+ {
29
+ "type": "string"
30
+ },
31
+ {
32
+ "type": "null"
33
+ }
32
34
  ],
33
- "title": "smartsheet_get_recordsArguments",
34
- "type": "object"
35
- }
35
+ "default": null,
36
+ "description": "文档的 docid,与 url 二选一传入",
37
+ "title": "Docid"
38
+ },
39
+ "limit": {
40
+ "anyOf": [
41
+ {
42
+ "type": "integer"
43
+ },
44
+ {
45
+ "type": "null"
46
+ }
47
+ ],
48
+ "default": null,
49
+ "description": "分页大小,每页返回多少条数据;当不填写该参数或将该参数设置为 0 时,如果总数大于 1000,一次性返回 1000 行记录,当总数小于 1000 时,返回全部记录;limit 最大值为 1000",
50
+ "title": "Limit"
51
+ },
52
+ "sheet_id": {
53
+ "description": "子表的 sheet_id,用于指定要查询的智能表格中的哪个子表",
54
+ "title": "Sheet Id",
55
+ "type": "string"
56
+ },
57
+ "url": {
58
+ "anyOf": [
59
+ {
60
+ "type": "string"
61
+ },
62
+ {
63
+ "type": "null"
64
+ }
65
+ ],
66
+ "default": null,
67
+ "description": "文档的访问链接,与 docid 二选一传入",
68
+ "title": "Url"
69
+ }
70
+ },
71
+ "required": [
72
+ "sheet_id"
73
+ ],
74
+ "title": "smartsheet_get_recordsArguments",
75
+ "type": "object"
76
+ }
36
77
  }
37
78
  ```
38
79
 
@@ -40,12 +81,16 @@
40
81
 
41
82
  | 参数 | 类型 | 必填 | 说明 |
42
83
  |---|---|---|---|
84
+ | cursor | string | 否 | 查询游标,不填代表从第一行记录开始查询 |
43
85
  | docid | string | 与 url 二选一 | 文档的 docid |
44
- | url | string | 与 docid 二选一 | 文档的访问链接 |
86
+ | limit | integer | 否 | 分页大小,每页返回多少条数据;当不填写该参数或将该参数设置为 0 时,如果总数大于 1000,一次性返回 1000 行记录,当总数小于 1000 时,返回全部记录;limit 最大值为 1000 |
45
87
  | sheet_id | string | 是 | 子表的 sheet_id,用于指定要查询的智能表格中的哪个子表 |
88
+ | url | string | 与 docid 二选一 | 文档的访问链接 |
46
89
 
47
90
  ## 请求示例
48
91
 
92
+ 以传入docid为例:
93
+
49
94
  ```json
50
95
  {
51
96
  "docid": "DOCID",
@@ -53,6 +98,8 @@
53
98
  }
54
99
  ```
55
100
 
101
+ 以传url为例:
102
+
56
103
  ```json
57
104
  {
58
105
  "url": "https://doc.weixin.qq.com/smartsheet/xxx",
@@ -60,37 +107,81 @@
60
107
  }
61
108
  ```
62
109
 
63
- ## 响应示例
110
+ ## 响应示例(含分页)
64
111
 
65
112
  ```json
66
113
  {
67
114
  "errcode": 0,
68
115
  "errmsg": "ok",
69
- "total": -1,
70
- "has_more": false,
71
- "next": 0,
116
+ "total": 100,
117
+ "has_more": true,
118
+ "next_cursor": "mock_cursor_token",
72
119
  "records": [
73
120
  {
74
- "record_id": "QizwnX",
75
- "create_time": "1775025981849",
76
- "update_time": "1775035035706",
121
+ "record_id": "rec_001",
122
+ "create_time": "1700000000000",
123
+ "update_time": "1700000000000",
77
124
  "values": {
78
- "任务名称": [
125
+ "成员": [
126
+ {"user_id": "real.user001", "id_type": 1}
127
+ ],
128
+ "序号": [
129
+ {"text": "1", "type": "text"}
130
+ ],
131
+ "附件": [
79
132
  {
80
- "text": "完成项目需求文档",
81
- "type": "text"
133
+ "doc_type": 2,
134
+ "file_ext": "xlsx",
135
+ "file_type": "Wedrive",
136
+ "file_url": "https://drive.weixin.qq.com/s?k=MOCK_TOKEN",
137
+ "name": "report.xlsx",
138
+ "size": 12345
82
139
  }
83
- ],
84
- "状态": [
140
+ ]
141
+ },
142
+ "creator_name": "张三",
143
+ "updater_name": "张三"
144
+ },
145
+ {
146
+ "record_id": "rec_002",
147
+ "create_time": "1700000000000",
148
+ "update_time": "1700000000000",
149
+ "values": {
150
+ "截图": [
85
151
  {
86
- "id": "oTBIKO",
87
- "style": 7,
88
- "text": "待开始"
152
+ "height": 1080,
153
+ "id": "img_mock_id",
154
+ "image_url": "https://wdcdn.qpic.cn/mocked_path?w=1920&h=1080",
155
+ "title": "screenshot_001",
156
+ "width": 1920
89
157
  }
158
+ ],
159
+ "序号": [
160
+ {"text": "2", "type": "text"}
90
161
  ]
91
- }
162
+ },
163
+ "creator_name": "张三",
164
+ "updater_name": "李四"
92
165
  }
93
166
  ]
94
167
  }
95
168
  ```
96
169
 
170
+ ## 响应数据结构
171
+
172
+ - `total`: 总记录数(integer)
173
+ - `has_more`: 是否还有更多数据(boolean)
174
+ - `next_cursor`: 下一页游标,用于分页(string,仅当 has_more 为 true 时存在)
175
+ - `records`: 记录数组
176
+
177
+
178
+ ## 分页查询
179
+
180
+ ```bash
181
+ # 第一页
182
+ wecom_mcp call doc smartsheet_get_records '{"docid": "DOCID", "sheet_id": "SHEETID"}'
183
+
184
+ # 下一页(使用上一条的 next_cursor)
185
+ wecom_mcp call doc smartsheet_get_records '{"docid": "DOCID", "sheet_id": "SHEETID", "cursor": "上一条的 next_cursor 值"}'
186
+ ```
187
+
@@ -13,9 +13,8 @@
13
13
 
14
14
  先走 `wecom_mcp` tool 正常链路(`smartsheet_add_records` / `smartsheet_update_records`)。仅在出现以下情况时才切换到 Webhook:
15
15
 
16
- - **优先判据**:返回 `errcode: 851003`,或 `errmsg` 包含 `no authority` —— 这通常意味着企业可见范围 > 10 人,写入接口被限制
17
- - 或 `errmsg` / 提示信息明显指向**企业规模 / 可见范围超限**(例如“超出可见范围”、“成员数超限”等相关描述)
18
- - 其他错误(参数错误、字段 ID 错误、文档不存在等)**不应**切换到 Webhook,应按原错误排查
16
+ - **优先判据**:返回 `errcode: 851003`,或 `errmsg` 包含 `no authority` —— 无文档权限。在编辑场景,通常是因为机器人不允许编辑由企业成员创建的文档
17
+ - 或 `errmsg` / 提示信息明显指向**无文档权限**(例如"超出可见范围"、"成员数超限"等相关描述)- 其他错误(参数错误、字段 ID 错误、文档不存在等)**不应**切换到 Webhook,应按原错误排查
19
18
 
20
19
  ### 切换时向用户索取的两样东西
21
20
 
@@ -54,7 +53,7 @@
54
53
 
55
54
  ### 向用户告知的话术参考
56
55
 
57
- - “通过 `wecom_mcp` 写入接口返回了 `851003 no authority`(通常是企业可见范围 > 10 人的限制)。请把目标表的 Webhook 地址和「接收外部数据」页面的示例 JSON 发我,我帮你通过 Webhook 写入。该信息仅本轮使用,不会保存到本地。”
56
+ - “通过 `wecom_mcp` 写入接口返回了 `851003 no authority`,无文档权限(在编辑场景,通常是因为机器人不允许编辑由企业成员创建的文档)。请把目标表的 Webhook 地址和「接收外部数据」页面的示例 JSON 发我,我帮你通过 Webhook 写入。该信息仅本轮使用,不会保存到本地。”
58
57
 
59
58
  ---
60
59