Install any skill in seconds. Free to start, no credit card required.
Get Started Free →用于访问乐享知识库平台的专用 skill。当用户明确提到「乐享」「lexiang」「知识库」「知识」「文档」等关键词,或用户提供的链接 host 为 lexiangla.com,应优先调用本 skill。本 skill 支持:获取文档内容与元数据、搜索文档内容、查询知识库与目录结构、创建/编辑/移动文档、管理标签与评论、上传文件及维护附件等知识库操作能力。
.claude/skills/lexiang-knowledge-base/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-14 | ✗→✓ | ▲ Improved | — | — |
| case-15 | ✗→✓ | ▲ Improved | — | — |
| case-16 | ✗→✓ | ▲ Improved | — | — |
| case-08 | ✗→✓ | ▲ Improved | — | — |
| case-18 | ✗→✓ | ▲ Improved | — | — |
> 触发场景:当用户明确提到「乐享」「lexiang」「知识」「文档」,或提供 lexiangla.com 链接,或给出 space_id、entry_id、team_id、/spaces/、/pages/ 等乐享标识时,应使用本服务。 > > 优先级:处理乐享相关操作时,优先使用本 Skill 提供的能力,而非直接调用 MCP。本 Skill 封装了最佳实践和完整的使用说明。 > > 需要调用 MCP 时,请以 MCP 服务端返回的最新的 schema 为准。
> ⛔ 必读(调用前必须理解): > > 1. 本服务直接暴露所有业务工具(如 team_list_teams、search_kb_search 等),可直接调用 > 2. 调用前先确认工具参数定义,以 MCP 返回的 schema 为准 > 3. 不确定参数时,使用 get_tool_schema(tool_name="xxx") 获取最新定义
当调用 MCP 连接失败或无认证信息时:
https://lexiangla.com/mcp 获取配置信息当 MCP 返回正常结果但附带过期预警信息时:
⚠️ 您的乐享访问令牌即将过期。请打开以下链接自动续期(需已登录):
https://lexiangla.com/mcp?action=renew&company_from={company_from}当 MCP 返回 401 未授权时:
🔒 您的乐享访问令牌已过期。请打开以下链接创建新会话:
https://lexiangla.com/mcp?action=recreate&company_from={company_from}
创建后请将新的 access_token 提供给我进行更新。company_from 和 access_token 必须属于同一租户,不同租户的 token 不能混用company_from 必须与当前配置一致| 概念 | 说明 | | ------------------- | ----------------------------------------------------------------------------------------- | | Team(团队) | 顶级组织单元,一个团队下可以有多个知识库(Space) | | Space(知识库) | 知识的容器,属于某个团队,包含多个条目(Entry),有 root_entry_id 作为根节点 | | Entry(条目) | 知识库中的内容单元,可以是页面(page)、文件夹(folder)或文件(file),支持树形结构(parent_id) | | File(文件) | 附件类型的条目,如 PDF、Word、图片等 |
Team → Space → Entry(树形结构,root_entry_id 为根)
├── page(页面)
├── folder(文件夹)
└── file(文件)域名固定为 https://lexiangla.com——即 {domain} = https://lexiangla.com
> ⛔ company_from 不是子域名,只能作为 URL 查询参数使用! > > ❌ 错误:https://km.lexiangla.com/pages/xxx(把 company_from 当子域名) > ❌ 错误:https://abc.lexiangla.com/pages/xxx > ✅ 正确:https://lexiangla.com/pages/xxx?company_from=km > ✅ 正确:https://lexiangla.com/pages/xxx(无 company_from 时)
链接拼接规则:
https://lexiangla.com/pages/{entry_id}?company_from={company_from}如果没有 company_from,直接使用 https://lexiangla.com/pages/{entry_id}(不加查询参数)。
company_from 获取方式(按优先级):
company_from 查询参数(如 mcp?company_from=km 中的 km)COMPANY_FROMcompany_from 查询参数> ⛔ 严禁使用 mcp.lexiang-app.com 拼接任何用户可访问的链接! 该域名仅用于 MCP 接口调用,不是用户访问地址。 > ⛔ 严禁将 company_from 拼接为子域名! company_from 只能作为 URL 查询参数(?company_from=xxx),不能拼成 https://{company_from}.lexiangla.com。
| 资源 | URL 格式 | | -------- | ------------------------------- | | 团队首页 | {domain}/t/{team_id}/spaces | | 知识库 | {domain}/spaces/{space_id} | | 知识条目 | {domain}/pages/{entry_id} |
当用户提供链接时,从 URL 路径中提取 ID(忽略查询参数):
| URL 路径 | 提取方式 | | ----------------------------- | ------------------------------------------- | | /spaces/{space_id} | 取 spaces/ 后面的部分作为 space_id | | /pages/{entry_id} | 取 pages/ 后面的部分作为 entry_id | | /t/{team_id}/spaces | 取 t/ 后面的部分作为 team_id |
> 核心原则:写入、修改、删除操作 必须基于用户明确提供的目标信息,禁止 Agent 自行选择或猜测目标。
| 条件 | 示例 | | ---- | ---- | | 用户提供了明确 URL | "写到这里:https://lexiangla.com/spaces/xxx" | | 用户提供了明确 ID | "写入 space_id 为 xxx 的知识库" | | 用户指定名称 + Agent 回显确认 | Agent 搜到后展示详情,用户确认 |
entry_create_entry、entry_import_content、entry_import_content_to_entry、block_update_block、block_update_blocks、block_create_block_descendant、block_delete_block、block_delete_block_children、block_move_blocks、entry_rename_entry、entry_move_entry、file_apply_upload、file_commit_upload、file_create_hyperlink
team_list_teams、team_describe_team、team_list_frequent_teams、space_list_spaces、space_describe_space、entry_list_children、block_list_block_children、search_kb_search、search_kb_embedding_search、space_list_recently_spaces、entry_list_latest_entries、entry_describe_ai_parse_content、file_describe_file、file_download_file 等只读操作可正常执行。
本服务直接暴露所有业务工具,可直接调用(如 team_list_teams()、search_kb_search(keyword="xxx"))。
同时提供以下辅助元工具,帮助发现和理解工具:
| 元工具 | 用途 | | ---------------------- | ---------------------------------------------- | | list_tool_categories | 列出所有工具分类及其工具列表 | | search_tools | 按关键词或分类搜索工具 | | get_tool_schema | 获取具体工具的完整参数定义 |
1. 直接调用已知工具:team_list_teams()、search_kb_search(keyword="xxx") 等
2. 不确定参数时:get_tool_schema(tool_name="xxx") → 获取参数定义
3. 不确定工具名时:search_tools(query="关键词") → 找到工具名> 大多数常用工具已在本 Skill 中列出,可直接使用;遇到新工具或不确定的参数时,再用 get_tool_schema 查询。
访问:https://lexiangla.com/mcp
登录后获取:
lxmcp_xxx)请阅读 setup.md 中的步骤说明,按指引完成配置。
bashexport COMPANY_FROM="your_company" export LEXIANG_TOKEN="lxmcp_YOUR_TOKEN_HERE"
编辑 mcp.json,将 ${COMPANY_FROM} 和 ${LEXIANG_TOKEN} 替换为实际值。
json{ "mcpServers": { "lexiang": { "enabled": true, "url": "https://mcp.lexiang-app.com/mcp?company_from=${COMPANY_FROM}", "transportType": "streamable-http", "headers": { "Authorization": "Bearer ${LEXIANG_TOKEN}" } } } }
配置完成后,立即调用 whoami() 进行连通性检查并获取用户身份信息:
whoami()✅ 乐享 MCP 连接成功!
👤 当前用户:{用户姓名}
🏢 绑定乐享:{企业/租户名称}
🎉 配置已就绪,你现在可以这样使用乐享知识库:
💡 试试这样提问:
• "看看我最近访问的知识库有什么更新"
• "我要记录今天的工作内容,为我创建一个乐享文档并拟写一个模版"
• "搜索关于 XXX 的知识文档"
• "帮我总结一下这个知识库的内容:{知识库链接}"> 根据 whoami 返回的实际字段灵活调整展示内容。
| 问题 | 解决方案 | |------|----------| | 连接无响应 | 确认 mcp.json 中 URL 包含 company_from 且格式正确 | | 401 未授权 | token 过期或租户不匹配,参见「AccessToken 生命周期管理」 | | 参数报错 | 执行 get_tool_schema(tool_name="xxx") 获取最新参数定义 |
lexiangla.com本 MCP 服务提供以下工具,可直接调用。参数不确定时以 get_tool_schema 返回为准。
entry_create_entry — 创建文档/文件夹entry_import_content — 导入 Markdown/HTML 创建新文档(⚠️ 仅新建)entry_import_content_to_entry — 导入内容到已有页面(支持覆盖/追加)entry_list_latest_entries — 获取最近更新条目entry_rename_entry — 重命名条目file_apply_upload — 申请文件上传(返回 upload_url 和 session_id)file_commit_upload — 确认上传完成block_convert_content_to_blocks — Markdown/HTML 转 Block 结构block_create_block_descendant — 创建 Block 结构block_update_block — 单块更新block_update_blocks — 批量更新block_move_blocks — 移动 Blockblock_delete_block_children — 删除子节点block_delete_block — 删除指定 Block(含子孙)block_describe_block — 获取单个 Block 详情block_list_block_children — 读取 Block 内容search_kb_search — 关键词搜索search_kb_embedding_search — 语义向量搜索team_list_teams — 获取团队列表team_describe_team — 获取团队详情team_list_frequent_teams — 获取常用团队列表space_list_spaces — 获取知识库列表space_describe_space — 获取知识库详情(返回 root_entry_id)space_list_recently_spaces — 获取最近访问知识库entry_list_children — 浏览目录结构entry_describe_entry — 获取条目元信息(不含正文)entry_describe_ai_parse_content — 获取 AI 解析内容(含正文)entry_list_parents — 获取父级路径(面包屑)file_create_hyperlink — 导入公众号文章等外部链接| 工具 | 适用场景 | |------|----------| | search_kb_search | 精确关键词匹配 | | search_kb_embedding_search | 模糊查询、"记得大意但忘了标题" |
建议:语义搜索召回后,再用 entry_describe_entry 或 entry_describe_ai_parse_content 精确读取。
根据返回的 target_type 拼接链接:
| target_type | URL 格式 | | ---------------------- | ------------------------------------------- | | kb_page | {domain}/pages/<target_id> | | kb_file / kb_video | {domain}/teams/<team_id>/docs/<target_id> |
> 适用于所有返回 entry_id 的操作,包括但不限于:entry_import_content、entry_create_entry、entry_import_content_to_entry、file_commit_upload、搜索结果等。
当操作成功返回了 entry_id(或 target_id),向用户展示访问链接时,使用上方「URL 规则」中定义的 {domain} 拼接:
{domain}/pages/{entry_id}mcp.lexiang-app.com 拼接用户访问链接mcp.lexiang-app.com)的域名作为用户访问域名company_from 拼接为子域名(如 https://{company_from}.lexiangla.com 是错误的){domain}| 工具 | 返回内容 | 用途 | |------|----------|------| | entry_describe_entry | 条目元信息(ID、名称、类型等) | 获取基本信息 | | entry_describe_ai_parse_content | 条目正文内容 | 读取实际内容进行分析 |
> ⚠️ 仅在用户主动提供了知识库链接时执行。详见下方「常见使用场景 > 场景0」。
核心步骤:提取 space_id → space_describe_space 获取 root_entry_id → entry_import_content 写入 → 用 {domain}/pages/{entry_id} 拼接访问链接返回给用户。
当用户提供 mp.weixin.qq.com 链接且意图是"导入/收藏/保存到乐享"时,使用 file_create_hyperlink。
> 如果用户只是想阅读或总结内容,不要默认导入。
> 用户:"把报告写入乐享,链接是 https://lexiangla.com/spaces/16c4224607ea45ebacce6c15130a4957"
Step 1: 从 URL 提取 space_id = "16c4224607ea45ebacce6c15130a4957"
Step 2: call_tool("space_describe_space", {"space_id": "..."}) → 获取 root_entry_id
Step 3: call_tool("entry_import_content", {"space_id": "...", "parent_id": root_entry_id, "name": "报告", "content": "...", "content_type": "markdown"})
Step 4: 从返回结果取 entry_id,向用户展示访问链接:{domain}/pages/{entry_id}> 要点:space_id 和 parent_id 要同时传;parent_id 用 root_entry_id 表示写入根目录;链接中 {domain} 见上方 URL 规则定义。
call_tool("entry_create_entry", {"name": "技术文档", "parent_entry_id": "abc123", "entry_type": "page"})call_tool("entry_import_content", {"parent_id": "folder123", "name": "技术文档", "content": "...", "content_type": "markdown"})call_tool("block_create_block_descendant", {
"entry_id": "doc123",
"descendant": [
{"block_id": "h1", "block_type": "h1", "heading1": {"elements": [{"text_run": {"content": "项目文档"}}]}},
{"block_id": "tip", "block_type": "callout", "callout": {"color": "#FFF3E0"}, "children": ["tip_p"]},
{"block_id": "tip_p", "block_type": "p", "text": {"elements": [{"text_run": {"content": "重要提示内容"}}]}},
{"block_id": "li1", "block_type": "bulleted_list", "bulleted": {"elements": [{"text_run": {"content": "功能一"}}]}}
],
"children": ["h1", "tip", "li1"]
})Step 1: call_tool("file_apply_upload", {"parent_entry_id": "folder123", "name": "README.md", "size": 1024})
→ 返回 upload_url, session_id
Step 2: HTTP PUT upload_url(上传文件内容,非 MCP 调用)
Step 3: call_tool("file_commit_upload", {"session_id": "..."})call_tool("block_list_block_children", {"entry_id": "abc123", "with_descendants": true})call_tool("block_update_blocks", {
"entry_id": "abc123",
"updates": {
"actual_block_id": {
"update_text_elements": {
"elements": [{"text_run": {"content": "更新后的内容"}}]
}
}
}
})> 详细说明:完整 Block 类型和字段定义见 references/block-schema.md。
block_id 为客户端临时 ID,服务端返回实际 ID 映射_mcp_fields 优化:所有工具支持 _mcp_fields 参数选择返回字段,减少 token 消耗> 更多细节:见 references/common-errors.md 和 references/markdown-import.md。
| 文档 | 说明 | | ----------------------- | ---------------------- | | block-schema.md | Block 类型完整说明 | | mcp-examples.md | 复杂 Block 结构示例 | | markdown-to-block.md | Markdown 转 Block 指南 | | block-update.md | 批量更新 Block 方法 | | content-reorganize.md | 文档结构重组 | | folder-sync.md | 文件夹同步方案 | | markdown-import.md | Markdown 导入详解 | | common-errors.md | 常见错误排查 | | skill-maintenance.md | 维护与反馈流程 |
| 脚本 | 说明 | | ------------------ | ------------------ | | sync-folder.ts | 文件夹增量同步 | | block-helper.ts | Block 构建辅助工具 | | mcp-validator.ts | MCP 参数校验 |
遇到问题时,请先查阅 references/common-errors.md。
Issue 反馈流程和 Skill 自我进化机制见 references/skill-maintenance.md。
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +50 percentage points is the difference between those two pass rates over the 20 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.