openclaw - 💡(How to fix) Fix Feishu wiki nodes 封装缺少分页参数,导致无法遍历知识库子节点 [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#78254Fetched 2026-05-07 03:39:11
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
2
Timeline (top)
mentioned ×2subscribed ×2closed ×1commented ×1

Code Example

{
     "action": "nodes",
     "space_id": "...",
     "parent_node_token": "P2NnwRZ8ViNFu4kYt4acma1Nnqb"
   }

---

Type.Object({
    action: Type.Literal("nodes"),
    space_id: Type.String({ description: "Knowledge space ID" }),
    parent_node_token: Type.Optional(
      Type.String({ description: "Parent node token (optional, omit for root)" }),
    ),
  }),

---

const res = await client.wiki.spaceNode.list({
    path: { space_id: spaceId },
    params: { parent_node_token: parentNodeToken },  // 缺少 page_size / page_token
  });
RAW_BUFFERClick to expand / collapse

问题描述

OpenClaw 的 feishu_wiki 工具在 action='nodes' 时,没有暴露飞书官方接口的分页参数(page_size / page_token),也没有在响应中返回分页标记(has_more / page_token)。这导致当知识库节点的子节点数量超过一页(默认 50 条)时,用户只能拿到第一页结果,无法完整遍历。

复现步骤

  1. 找一个子节点数量 > 50 的知识库节点(例如 P2NnwRZ8ViNFu4kYt4acma1Nnqb)。
  2. 调用 OpenClaw 工具:
    {
      "action": "nodes",
      "space_id": "...",
      "parent_node_token": "P2NnwRZ8ViNFu4kYt4acma1Nnqb"
    }
  3. 观察返回结果,最多只有 50 条节点,且没有任何字段指示是否还有更多数据或下一页 token。

期望行为

  • 请求端:支持传入 page_size(可选,最大 50)和 page_token(可选,首次请求可不传)。
  • 响应端:返回 has_more(布尔值)和 page_token(下一页标识),以便调用方继续翻页遍历。

实际行为

  • 请求 Schema 中 action: nodes 仅包含 space_idparent_node_token,缺失 page_size / page_token
    Type.Object({
      action: Type.Literal("nodes"),
      space_id: Type.String({ description: "Knowledge space ID" }),
      parent_node_token: Type.Optional(
        Type.String({ description: "Parent node token (optional, omit for root)" }),
      ),
    }),
  • 实现代码中调用 SDK 时只传递了 parent_node_token,没有透传分页参数:
    const res = await client.wiki.spaceNode.list({
      path: { space_id: spaceId },
      params: { parent_node_token: parentNodeToken },  // 缺少 page_size / page_token
    });
  • 响应体仅返回节点数组,没有 has_more / page_token,调用方无法判断是否已遍历完所有子节点。

建议的最小修复

  1. wiki-schema.tsaction: "nodes" 分支中增加可选参数:
    • page_size?: number(最大 50)
    • page_token?: string
  2. wiki.tslistNodes 函数中将这两个参数透传给 client.wiki.spaceNode.listparams
  3. 在响应结果中追加官方接口已有的 has_morepage_token(如果 SDK 返回的话),方便调用方循环翻页。

参考文档

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Feishu wiki nodes 封装缺少分页参数,导致无法遍历知识库子节点 [1 comments, 2 participants]