lark-toolkitComprehensive Lark/Feishu API skill for OpenClaw agents. Covers all Lark operations via three access paths: claw-lark plugin (message tool), MCP tools (mcpor...
Install via ClawdBot CLI:
clawdbot install Pengxiao-Wang/lark-toolkitThis skill is a documentation-only reference guide. It contains no executable code that accesses credentials automatically.
Required credentials (user-provided, never bundled):
app_id) β from Lark Developer Consoleapp_secret) β from the same consoleHow credentials are used:
, , CHAT_ID, etc.) β no real secretsscripts/get_token.sh helper obtains a temporary tenant_access_token from Lark's auth API. It reads credentials from (in order):1. Command-line arguments
2. LARK_APP_ID / LARK_APP_SECRET environment variables
3. ~/.openclaw/openclaw.json (standard OpenClaw config, path channels.lark.accounts.default.appId/appSecret)
LARK_TOKEN env var for subsequent commands in the same shell session| Need | Path | When |
|------|------|------|
| Send/receive messages | claw-lark plugin (message tool) | Basic text, media, reactions β simplest |
| Structured CRUD ops | MCP tools via mcporter | Bitable, calendar, docs, tasks, OKR β 38 tools |
| Everything else | Direct API (curl) | Contacts, member mgmt, anything MCP doesn't cover |
Rule: claw-lark first β MCP second β direct API as fallback.
TOKEN=$(curl -s -X POST 'https://open.larksuite.com/open-apis/auth/v3/tenant_access_token/internal' \
-H 'Content-Type: application/json' \
-d '{"app_id":"<APP_ID>","app_secret":"<APP_SECRET>"}' \
| python3 -c "import sys,json; print(json.load(sys.stdin)['tenant_access_token'])")
Or use the helper: bash scripts/get_token.sh
Token validity: ~2 hours. Cache it.
| Platform | API Base | Dev Console |
|----------|----------|-------------|
| Lark International | https://open.larksuite.com/open-apis/ | https://open.larksuite.com/app |
| Feishu (China) | https://open.feishu.cn/open-apis/ | https://open.feishu.cn/app |
β οΈ Lark β Feishu. Always confirm which platform the tenant uses.
curl -X POST "https://open.larksuite.com/open-apis/im/v1/messages?receive_id_type=chat_id" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"receive_id":"CHAT_ID","msg_type":"text","content":"{\"text\":\"hello\"}"}'
curl -X POST "https://open.larksuite.com/open-apis/im/v1/messages/MSG_ID/reply" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"msg_type":"text","content":"{\"text\":\"reply\"}","reply_in_thread":true}'
curl -X POST "https://open.larksuite.com/open-apis/im/v1/messages/MSG_ID/reactions" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"reaction_type":{"emoji_type":"THUMBSUP"}}'
Emoji types: THUMBSUP HEART LAUGH OK COOL FINGERHEART SMILE JIAYOU
# List root departments
curl -s -H "Authorization: Bearer $TOKEN" \
'https://open.larksuite.com/open-apis/contact/v3/departments?parent_department_id=0&page_size=50&fetch_child=true'
# List users in a department
curl -s -H "Authorization: Bearer $TOKEN" \
'https://open.larksuite.com/open-apis/contact/v3/users?department_id=<DEPT_ID>&page_size=50'
Key fields: name, open_id, employee_type (1=regular, 2=intern), department_ids
curl -s -H "Authorization: Bearer $TOKEN" \
'https://open.larksuite.com/open-apis/im/v1/messages?container_id_type=chat&container_id=<CHAT_ID>&page_size=20&sort_type=ByCreateTimeDesc'
curl -X POST "https://open.larksuite.com/open-apis/im/v1/chats/<CHAT_ID>/members?member_id_type=app_id" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"id_list":["<BOT_APP_ID>"]}'
mcporter call lark-mcp.<tool_name> key=value
Full catalog with parameters: references/mcp-tools.md
| Module | Key Tools |
|--------|-----------|
| Bitable | create apps/tables, CRUD records, list fields |
| Calendar | create/get/patch events, free/busy, primary calendar |
| Docs | read content, search, import, set permissions |
| IM | create/list groups, get members, send messages, list history |
| OKR | batch get, list periods, CRUD progress, query reviews |
| Report | query rules/tasks, manage views |
| Task | create/patch tasks, add members/reminders |
| Wiki | search nodes, get node details |
| Contacts | batch get user IDs by email/phone |
GET /contact/v3/users?department_id=GET /contact/v3/departmentsPOST /im/v1/chats/{chat_id}/membersPOST /im/v1/messages/{msg_id}/reactionsPOST /im/v1/images / POST /im/v1/filesMost list APIs use cursor-based pagination:
?page_size=50&page_token=<token_from_previous_response>
Check has_more in response.
| Code | Meaning |
|------|---------|
| 0 | Success |
| 99991663 | Token expired β refresh |
| 99991664 | Token invalid |
| 99991400 | Bad request |
| 99991403 | No permission β check app permissions |
open.larksuite.com, China uses open.feishu.cnevent_id (Lark retries up to 3x)127.0.0.1:PORT not localhost:PORT in ngrok configGenerated Mar 1, 2026
Teams use the Lark Toolkit to automate daily communication and task management. For example, an AI agent can send daily standup reminders via the claw-lark plugin, create tasks in Lark Tasks using MCP tools, and list department members via direct API for onboarding. This streamlines coordination across departments like engineering and marketing.
Support teams leverage the toolkit to handle inquiries efficiently. An AI agent can receive customer messages via webhooks, reply in threads using direct API, and log issues in Bitable via MCP tools for tracking. This reduces response times and improves issue resolution in industries like e-commerce or SaaS.
Project managers use the toolkit to monitor progress and generate reports. For instance, an AI agent can create calendar events for milestones via MCP tools, query OKR data for performance reviews, and send summary messages to stakeholders using the claw-lark plugin. This enhances visibility in sectors like consulting or construction.
HR departments automate employee onboarding and management processes. An AI agent can list new hires by department via direct API, schedule orientation events in Lark Calendar using MCP tools, and send welcome messages via the claw-lark plugin. This speeds up integration in large organizations across various industries.
Content teams use the toolkit to organize and share documents. For example, an AI agent can search Wiki nodes via MCP tools, import docs into Lark Docs, and notify team members of updates via direct API reactions. This supports collaborative editing in fields like education or media.
Companies offer custom integration services using the Lark Toolkit to connect Lark with other business systems. They develop automated workflows, such as syncing Lark Bitable with CRM data via MCP tools, and charge subscription fees for maintenance and support. This model targets enterprises seeking to enhance productivity.
Consultants provide expertise in deploying and optimizing the Lark Toolkit for clients. They conduct workshops on using claw-lark, MCP tools, and direct API for specific use cases like sales automation or internal audits, earning revenue through project-based contracts or hourly rates. This serves businesses new to Lark platforms.
Providers build and manage AI agents that utilize the Lark Toolkit for clients' daily operations. For example, they offer agents that handle customer inquiries via Lark messages and update tasks automatically, generating revenue through managed service agreements. This model benefits SMEs lacking in-house technical resources.
π¬ Integration Tip
Start with the claw-lark plugin for basic messaging, then integrate MCP tools for structured operations like calendar events, and use direct API as a fallback for gaps such as department user listings to ensure comprehensive coverage.
Transform AI agents from task-followers into proactive partners that anticipate needs and continuously improve. Now with WAL Protocol, Working Buffer, Autonomous Crons, and battle-tested patterns. Part of the Hal Stack π¦
Use the ClawdHub CLI to search, install, update, and publish agent skills from clawdhub.com. Use when you need to fetch new skills on the fly, sync installed skills to latest or a specific version, or publish new/updated skill folders with the npm-installed clawdhub CLI.
Clawdbot documentation expert with decision tree navigation, search scripts, doc fetching, version tracking, and config snippets for all Clawdbot features
Interact with Moltbook social network for AI agents. Post, reply, browse, and analyze engagement. Use when the user wants to engage with Moltbook, check their feed, reply to posts, or track their activity on the agent social network.
OpenClaw CLI wrapper β gateway, channels, models, agents, nodes, browser, memory, security, automation.
MoltGuard β runtime security plugin for OpenClaw agents by OpenGuardrails. Helps users install, register, activate, and check the status of MoltGuard. Use wh...