Skip to main content
Glama

lark_send_text

Send text or Markdown messages to Lark/Feishu group bots via the Notify MCP Server. Configure bot keys and message types for notifications.

Instructions

飞书/Lark群机器人发送文本或Markdown消息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes消息内容
msgtypeNo内容类型,仅支持: text/markdownmarkdown
bot_keyNo飞书/Lark机器人key,uuid格式,默认从环境变量获取
is_larkNo根据用户描述识别 0:飞书 1:Lark

Implementation Reference

  • The handler function implementing the lark_send_text tool logic, including input schema via Pydantic Fields and HTTP request to Feishu/Lark API.
    @mcp.tool( title="飞书/Lark机器人-发送文本消息", description="飞书/Lark群机器人发送文本或Markdown消息", ) def lark_send_text( text: str = Field(description="消息内容"), msgtype: str = Field("markdown", description="内容类型,仅支持: text/markdown"), bot_key: str = Field("", description="飞书/Lark机器人key,uuid格式,默认从环境变量获取"), is_lark: int = Field(0, description="根据用户描述识别 0:飞书 1:Lark"), ): """ https://open.feishu.cn/document/ukTMukTMukTM/ucTM5YjL3ETO24yNxkjN https://open.larksuite.com/document/client-docs/bot-v3/add-custom-bot """ if msgtype == "markdown": body = { "msg_type": "interactive", "card": {"elements": [{"tag": msgtype, "content": text}]}, } else: body = {"msg_type": msgtype, "content": {"text": text}} if not bot_key: bot_key = os.getenv("LARK_BOT_KEY" if is_lark else "FEISHU_BOT_KEY", "") if is_lark: base = os.getenv("LARK_BASE_URL") or "https://open.larksuite.com" else: base = os.getenv("FEISHU_BASE_URL") or "https://open.feishu.cn" res = requests.post( f"{base}/open-apis/bot/v2/hook/{bot_key}", json=body, ) return res.json()
  • Top-level registration of tools from various modules, including other.add_tools(mcp) which registers the lark_send_text tool.
    wework.add_tools(mcp) tgbot.add_tools(mcp) other.add_tools(mcp) hass.add_tools(mcp) util.add_tools(mcp)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aahl/mcp-notify'

If you have feedback or need assistance with the MCP directory API, please join our Discord server