lark-docs
npx skills add https://github.com/serendipityoneinc/srp-claude-code-marketplace --skill lark-docs
Agent 安装分布
Skill 文档
Lark Docs Access (é£ä¹¦äºææ¡£æé)
ä»¥ç¨æ·èº«ä»½è®¿é®åæç´¢é£ä¹¦äºææ¡£ï¼å æ¬ææ¡£ãè¡¨æ ¼ãå¤ç»´è¡¨æ ¼åç¥è¯åºçã
Access and search Lark cloud documents as the authenticated user, including docs, sheets, bitables, and wiki spaces.
Quick Start
Search for Documents (æç´¢ææ¡£)
æç´¢å
å«'OKR'çææ¡£
Search for documents containing 'product roadmap'
Access Document Content (è®¿é®ææ¡£å 容)
è·åè¿ä¸ªææ¡£çå
容ï¼https://example.feishu.cn/docx/abc123
Get the content of this document: https://example.feishu.cn/wiki/xyz789
Search Wiki Spaces (æç´¢ç¥è¯åº)
å¨ç¥è¯åºä¸æç´¢å
³äº'æ¶æè®¾è®¡'çå
容
Search wiki for 'system architecture' documentation
Key Features
1. Document Search (ææ¡£æç´¢)
Search across all document types that the user has access to:
- Documents (ææ¡£): docx format documents
- Sheets (è¡¨æ ¼): spreadsheet documents
- Bitables (å¤ç»´è¡¨æ ¼): database/table documents
- Wiki (ç¥è¯åº): wiki pages and spaces
Available MCP Tools:
mcp__lark__docx_builtin_search– Search cloud documentsmcp__lark__wiki_v1_node_search– Search wiki content
Search Parameters:
search_key(required): Keyword to search fordocs_types: Filter by document type (doc, sheet, bitable, mindnote, file)owner_ids: Filter by document owner’s open_idchat_ids: Filter by group where document is locatedcount: Number of results (max 50, default 10)offset: Pagination offset
2. Document Content Access (ææ¡£å 容访é®)
Retrieve the actual content of documents:
Available MCP Tools:
mcp__lark__docx_v1_document_rawContent– Get plain text contentmcp__lark__wiki_v2_space_getNode– Get wiki node information
Parameters:
document_id: The unique document identifierlang: Language for @mentions (0=Chinese, 1=English)
3. Permission Management (æé管ç)
Check and manage document permissions:
Available MCP Tools:
mcp__lark__drive_v1_permissionMember_create– Add permissions
Permission Roles:
view: Read-only accessedit: Can edit the documentfull_access: Full management access
Common Workflows
Workflow 1: Search and Read Documents
1. User: "æç´¢å
å«'产å路线å¾'çææ¡£"
2. Assistant uses: mcp__lark__docx_builtin_search
- search_key: "产å路线å¾"
- count: 10
3. Display results with titles and URLs
4. User: "æå¼ç¬¬ä¸ä¸ªææ¡£"
5. Assistant uses: mcp__lark__docx_v1_document_rawContent
- document_id: extracted from URL
6. Display document content
Workflow 2: Wiki Navigation
1. User: "Show me the engineering wiki"
2. Assistant uses: mcp__lark__wiki_v1_node_search
- query: "engineering"
3. Display wiki pages and their hierarchy
4. User: "Get the content of the API documentation page"
5. Assistant uses: mcp__lark__wiki_v2_space_getNode
- token: wiki_page_token
6. Display wiki content
Workflow 3: Document Discovery by Owner
1. User: "å¼ ä¸åå»ºçææææ¡£"
2. First get user ID: mcp__lark__contact_v3_user_batchGetId
- emails: ["zhangsan@company.com"]
3. Then search: mcp__lark__docx_builtin_search
- search_key: ""
- owner_ids: [user_open_id]
4. Display documents created by that user
Examples (示ä¾)
Example 1: Basic Search (åºç¡æç´¢)
User (Chinese):
帮ææç´¢å
å«'å£åº¦OKR'çææ¡£
Assistant Response:
I'll search for documents containing 'å£åº¦OKR'.
<uses mcp__lark__docx_builtin_search>
- search_key: "å£åº¦OKR"
- count: 10
Found 3 documents:
1. **2024 Q4 OKR Review** (docx)
- Owner: å¼ ä¸
- Updated: 2024-01-10
- Link: https://example.feishu.cn/docx/abc123
2. **Team OKR Template** (docx)
- Owner: æå
- Updated: 2024-01-08
- Link: https://example.feishu.cn/docx/def456
3. **Q1 2025 OKR Planning** (sheet)
- Owner: çäº
- Updated: 2024-01-12
- Link: https://example.feishu.cn/sheets/ghi789
Would you like me to open any of these documents?
Example 2: Get Document Content (è·åææ¡£å 容)
User (English):
Get the content of this document: https://example.feishu.cn/docx/abc123
Assistant Response:
I'll retrieve the content of that document.
<uses mcp__lark__docx_v1_document_rawContent>
- document_id: abc123
Here's the document content:
# 2024 Q4 OKR Review
## Engineering Team
### Objective 1: Improve System Reliability
- KR1: Achieve 99.9% uptime â (Completed: 99.95%)
- KR2: Reduce MTTR to under 30 minutes â (Completed: 25 min)
- KR3: Complete disaster recovery testing â (In Progress: 80%)
### Objective 2: Enhance Developer Productivity
- KR1: Reduce build time by 40% â (Completed: 45% reduction)
- KR2: Implement automated code review â (Completed)
- KR3: Launch internal developer portal â (Delayed to Q1 2025)
[... more content ...]
Would you like me to summarize the key points or search for related documents?
Example 3: Wiki Search (ç¥è¯åºæç´¢)
User (Chinese):
å¨å·¥ç¨ç¥è¯åºä¸æç´¢å
³äº'å¾®æå¡æ¶æ'çææ¡£
Assistant Response:
æä¼å¨å·¥ç¨ç¥è¯åºä¸æç´¢'å¾®æå¡æ¶æ'ç¸å
³å
容ã
<uses mcp__lark__wiki_v1_node_search>
- query: "å¾®æå¡æ¶æ"
æ¾å° 5 个ç¸å
³é¡µé¢:
1. **å¾®æå¡æ¶æè®¾è®¡æå**
- è·¯å¾: å·¥ç¨ææ¡£ > æ¶æè®¾è®¡ > å¾®æå¡
- æ´æ°æ¶é´: 2024-01-10
- [æ¥ç页é¢](https://example.feishu.cn/wiki/page1)
2. **æå¡æåæä½³å®è·µ**
- è·¯å¾: å·¥ç¨ææ¡£ > æ¶æè®¾è®¡ > æä½³å®è·µ
- æ´æ°æ¶é´: 2024-01-08
- [æ¥ç页é¢](https://example.feishu.cn/wiki/page2)
3. **API Gateway é
置说æ**
- è·¯å¾: å·¥ç¨ææ¡£ > åºç¡è®¾æ½ > ç½å
³
- æ´æ°æ¶é´: 2024-01-12
- [æ¥ç页é¢](https://example.feishu.cn/wiki/page3)
éè¦ææå¼å
¶ä¸æä¸ªé¡µé¢æ¥ç详ç»å
容å?
Important Notes
Permission Boundaries (æéè¾¹ç)
- All operations respect the user’s actual Lark permissions
- If a document is not accessible, you’ll receive a permission error
- Cannot access private documents or groups the user is not a member of
Document ID Extraction (ææ¡£IDæå)
Document URLs have this format:
- Docx:
https://*.feishu.cn/docx/{document_id} - Wiki:
https://*.feishu.cn/wiki/{wiki_token} - Sheets:
https://*.feishu.cn/sheets/{spreadsheet_id} - Bitable:
https://*.feishu.cn/base/{app_token}
Extract the ID/token from the URL when accessing content.
Search Limitations (æç´¢éå¶)
- Maximum 50 results per search (count parameter)
- Use pagination (offset) for more results
- Search is case-insensitive
- Results are sorted by relevance
Content Format (å å®¹æ ¼å¼)
docx_v1_document_rawContentreturns plain text (no formatting)- @mentions are converted to display names based on lang parameter
- For rich formatted content, use the API to get structured data
Error Handling
Common errors and solutions:
-
“Permission denied” (æé被æç»)
- The user doesn’t have access to this document
- Ask the document owner to grant permission
-
“Document not found” (ææ¡£æªæ¾å°)
- Document ID is invalid or document was deleted
- Verify the document URL is correct
-
“Invalid token” (æ æä»¤ç)
- MCP server authentication failed
- Check LARK_APP_ID and LARK_APP_SECRET environment variables
- Ensure OAuth token is valid
Tips for Effective Use
- Start with search: Use keyword search before asking for specific documents
- Be specific: Include relevant keywords to narrow down results
- Use filters: Filter by document type or owner to find documents faster
- Check permissions: Verify access before trying to read document content
- Bilingual support: Works with both Chinese and English queries
Related Skills
lark-messages: Access Lark messages and groups- Future:
lark-approval,lark-calendar,lark-drive