yuppie-mcp-lark

v0.6.0
yuppie-mcp-lark Checked 1 day ago Published 1 month ago

MCP Server for Lark/Feishu OpenAPI

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

message_send

发送消息给单个用户或群。 content 是 JSON 字符串,不同 msg_type 的 content 格式: 1. text(文本): {"text":"你好"} 2. interactive(卡片,支持 markdown、at 等): {"elements":[{"tag":"markdown","content":"普通文本\n\n<at id=\"all\"></at>"}]} 3. post(富文本): {"zh_cn":{"title":"标题","content":[[{"tag":"text","text":"内容"}]]}} 4. image(图片): {"image_key":"img_xxxxx"}

ParameterTypeDescription
content *string消息内容 JSON 字符串,文本≤150KB,卡片/富文本≤30KB
receive_id *string接收者 ID
msg_typestring消息类型,默认 text
receive_id_typestringID 类型:open_id / user_id / union_id / chat_id
uuid去重序列号,相同 uuid 在 1 小时内至多发送一条消息

card_send

发送卡片消息(interactive)。card 为卡片 schema 对象,内部自动 JSON 序列化。

ParameterTypeDescription
card *object卡片 JSON 对象(飞书卡片 schema),如 {"elements":[...], "header":{...}}
receive_id *string接收者 ID(群 chat_id / 用户 open_id)
receive_id_typestringID 类型:open_id / user_id / union_id / chat_id,默认 chat_id
uuid去重序列号,相同 uuid 在 1 小时内至多发送一条消息

card_update

原地更新已发送的卡片消息(PATCH)。card 为完整的新卡片 schema 对象。

ParameterTypeDescription
card *object新的卡片 JSON 对象(飞书卡片 schema)
message_id *string要更新的消息 ID

webhook_card_send

发送卡片消息到自定义机器人所在群(webhook,无需应用鉴权)。 注意:webhook 只能发送,不能更新/撤回;请求体 ≤ 20KB。

ParameterTypeDescription
card *object卡片 JSON 对象(飞书卡片 schema 2.0)
secret签名密钥;不传则读环境变量 FEISHU_WEBHOOK_SECRET(未配置则不签名)
url自定义机器人 webhook 地址;不传则读环境变量 FEISHU_WEBHOOK_URL

drive_copy_file

复制文件到指定文件夹。

ParameterTypeDescription
file_token *string源文件 token
file_type *string源文件类型:file/doc/sheet/bitable/docx
folder_token *string目标文件夹 token
name *string新文件名称
user_id_type用户 ID 类型

drive_delete_file

删除云空间内的文件或文件夹(进入回收站)。

ParameterTypeDescription
file_token *string文件或文件夹 token
file_type *string文件类型:file/doc/sheet/bitable/docx/folder

drive_check_task

查询异步任务状态(删除/移动文件夹)。

ParameterTypeDescription
task_id *string异步任务 ID

drive_upload_file

上传文件到云空间指定文件夹(最大 20 MB)。

ParameterTypeDescription
file_path *string本地文件路径
parent_node *string目标文件夹 token
checksum文件的 Adler-32 校验和
file_name文件名,不传则从 file_path 提取

drive_list_files

获取文件夹中的文件清单,支持分页。

ParameterTypeDescription
direction排序方向:ASC / DESC
folder_token文件夹 token,不传则获取根目录
order_by排序:EditedTime / CreatedTime
page_size每页数量,最大 200
page_token分页 token
user_id_type用户 ID 类型:open_id / union_id / user_id

drive_create_folder

在云空间中创建一个空文件夹。

ParameterTypeDescription
folder_token *string父文件夹 token
name *string文件夹名称

bitable_search_records

搜索多维表格记录,返回 markdown 表格。支持分页、排序、过滤。

ParameterTypeDescription
app_token *string多维表格 app_token
table_id *string数据表 table_id
automatic_fields是否返回自动计算字段
field_names指定返回字段名列表
filter过滤条件
page_size分页大小(1-500)
page_token分页 token
sort排序规则
user_id_type用户 ID 类型:open_id / user_id / union_id
view_id视图 ID

bitable_create_record

创建一条多维表格记录。

ParameterTypeDescription
app_token *string多维表格 app_token
fields *object记录字段数据,如 {"字段名": "字段值"}
table_id *string数据表 table_id

bitable_update_record

更新一条多维表格记录。

ParameterTypeDescription
app_token *string多维表格 app_token
fields *object记录字段数据
record_id *string记录 ID
table_id *string数据表 table_id

bitable_delete_record

删除一条多维表格记录。

ParameterTypeDescription
app_token *string多维表格 app_token
record_id *string记录 ID
table_id *string数据表 table_id

bitable_batch_create_records

批量创建多维表格记录(最多 500 条)。

ParameterTypeDescription
app_token *string多维表格 app_token
records *array记录列表,每条含 fields 字段,最多 500 条
table_id *string数据表 table_id

bitable_batch_update_records

批量更新多维表格记录(最多 500 条)。

ParameterTypeDescription
app_token *string多维表格 app_token
records *array记录列表,每条含 record_id 和 fields,最多 500 条
table_id *string数据表 table_id

bitable_batch_get_records

批量获取多维表格记录(最多 100 条)。

ParameterTypeDescription
app_token *string多维表格 app_token
record_ids *array记录 ID 列表,最多 100 条
table_id *string数据表 table_id
automatic_fields是否返回自动计算字段
user_id_type用户 ID 类型:open_id / user_id / union_id
with_shared_url是否返回分享链接

bitable_batch_delete_records

批量删除多维表格记录(最多 500 条)。

ParameterTypeDescription
app_token *string多维表格 app_token
record_ids *array记录 ID 列表,最多 500 条
table_id *string数据表 table_id

bitable_create_app

在指定文件夹中创建一个新的多维表格应用。

ParameterTypeDescription
name *string多维表格名称
folder_token文件夹 token
time_zone文档时区

bitable_copy_app

复制多维表格,可以指定名称、目标文件夹等。

ParameterTypeDescription
app_token *string要复制的多维表格 app_token
folder_token目标文件夹 token
name新表格名称
time_zone文档时区
without_content是否仅复制结构(不复制内容)

bitable_create_table

在指定多维表格中创建新的数据表。

ParameterTypeDescription
app_token *string多维表格 app_token
table *object数据表定义,含 name(必填)、default_view_name、fields 等

bitable_delete_table

删除多维表格中的指定数据表(至少保留一张表)。

ParameterTypeDescription
app_token *string多维表格 app_token
table_id *string要删除的数据表 ID

quick_bitable_clear

分页获取所有记录并批量删除,支持筛选条件。

ParameterTypeDescription
app_token *string多维表格 app_token
table_id *string数据表 table_id
filter筛选条件,只删除符合条件的数据
sort排序条件

sheets_get_metainfo

获取电子表格元信息,含工作表列表(标题、sheetId、行数、列数)。

ParameterTypeDescription
spreadsheet_token *string电子表格 token

sheets_add_sheet

添加工作表,返回新 sheetId。

ParameterTypeDescription
spreadsheet_token *string电子表格 token
title *string新工作表标题

sheets_delete_sheet

删除指定工作表。

ParameterTypeDescription
sheet_id *string工作表 ID
spreadsheet_token *string电子表格 token

sheets_copy_sheet

复制工作表,返回新 sheetId。

ParameterTypeDescription
source_sheet_id *string源工作表 ID
spreadsheet_token *string电子表格 token
title *string新工作表标题

sheets_create_spreadsheet

创建一个新的电子表格。

ParameterTypeDescription
title *string电子表格标题
folder_token文件夹 token

sheets_get_spreadsheet

获取电子表格的基本信息。

ParameterTypeDescription
spreadsheet_token *string电子表格 token

sheets_query_sheets

查询电子表格中的所有工作表。

ParameterTypeDescription
spreadsheet_token *string电子表格 token

sheets_read_range

读取单个范围数据,返回 markdown 表格(超过 10 行仅预览前 10 行)。

ParameterTypeDescription
range_str *string范围,如 {sheetId}!A1:C10
spreadsheet_token *string电子表格 token

sheets_read_ranges

读取多个范围数据,每个范围以 markdown 表格呈现。

ParameterTypeDescription
ranges *string多个范围,逗号分隔,如 "sheetId1!A2:B6,sheetId2!B1:C8"
spreadsheet_token *string电子表格 token
date_time_render_option日期时间渲染选项:FormattedString
user_id_type用户 ID 类型:open_id / union_id
value_render_option值渲染选项:ToString / Formula / FormattedValue / UnformattedValue

sheets_write_image

向指定单元格写入图片,支持 PNG/JPEG/GIF/BMP 等格式。

ParameterTypeDescription
image_base64 *string图片 base64 编码内容
name *string图片文件名,含后缀,如 "test.png"
range *string单元格范围,如 "sheetId!A1:A1"
spreadsheet_token *string电子表格 token

sheets_write_range

向单个范围写入数据(≤5000 行、100 列)。

ParameterTypeDescription
range_str *string范围
spreadsheet_token *string电子表格 token
values *array二维数组

sheets_append_data

追加数据到工作表(自动找空白位置写入)。

ParameterTypeDescription
sheet_id *string工作表 ID
spreadsheet_token *string电子表格 token
values *array二维数组
data_startinteger数据起始行(1-based),默认 2

sheets_delete_dimension

删除行或列(1-based 含首尾,单次最多 5000 行/列)。

ParameterTypeDescription
end_index *integer结束索引(1-based 含)
sheet_id *string工作表 ID
spreadsheet_token *string电子表格 token
start_index *integer起始索引(1-based 含)
major_dimensionstringCOLUMNS 或 ROWS,默认 COLUMNS

sheets_move_dimension

移动行或列(0-based 含首尾,单次最多 5000 行/列)。

ParameterTypeDescription
destination_index *integer目标位置索引(0-based)
end_index *integer结束索引(0-based 含)
sheet_id *string工作表 ID
spreadsheet_token *string电子表格 token
start_index *integer起始索引(0-based 含)
major_dimensionstringCOLUMNS 或 ROWS,默认 COLUMNS

sheets_update_dimension

更新行列属性(行高/列宽/显示隐藏),单次最多 5000 行/列。

ParameterTypeDescription
end_index *integer结束位置(1-based 含)
sheet_id *string工作表 ID
spreadsheet_token *string电子表格 token
start_index *integer起始位置(1-based 含)
fixed_size行高或列宽(像素)
major_dimensionstring维度:ROWS(行)或 COLUMNS(列)
visible是否显示行或列

sheets_styles_batch_update

批量设置单元格样式,单次最多 50000 个单元格。

ParameterTypeDescription
data *array样式数据,每项含 ranges(范围列表)和 style(样式对象)
spreadsheet_token *string电子表格 token

quick_sheets_filter_columns

只保留指定列,删除其余列(包括空白列)。

ParameterTypeDescription
keep_columns *array要保留的列名列表,其余列将被删除
sheet_id *string工作表 ID
spreadsheet_token *string电子表格 token
data_startinteger数据起始行(1-based),默认 2

quick_sheets_set_batch_index

按列设置批次索引,将数据按 batch_size 分组并写入批次号。

ParameterTypeDescription
sheet_id *string工作表 ID
spreadsheet_token *string电子表格 token
batch_columnstring批次列名,默认 f_batch_index
batch_sizeinteger每批行数,默认 10
data_startinteger数据起始行(1-based),默认 2

quick_sheets_set_header_list

从指定位置写入新表头。

ParameterTypeDescription
header_list *array新表头列表
sheet_id *string工作表 ID
spreadsheet_token *string电子表格 token
data_startinteger表头所在行=data_start-1,默认 2
keep_columns保留的原始列数,不指定则从 A 列写入

quick_sheets_get_column_last_value

获取指定列中最后一个数值(跳过表头),用于确定最大批次等场景。

ParameterTypeDescription
column_name *string列名,将在表头中查找其位置
sheet_id *string工作表 ID
spreadsheet_token *string电子表格 token
data_startinteger数据起始行(1-based),默认 2

quick_sheets_get_rows_by_batch

按批次范围读取行数据,返回 markdown 表格。

ParameterTypeDescription
batch_id *integer批次号,从 1 开始
batch_size *integer每批行数
sheet_id *string工作表 ID
spreadsheet_token *string电子表格 token
data_startinteger数据起始行(1-based),默认 2

quick_sheets_batch_update

批量更新多行,一次请求更新所有指定列。

ParameterTypeDescription
sheet_id *string工作表 ID
spreadsheet_token *string电子表格 token
update_data *array更新数据,每行一个 dict,含 row_number 和要更新的列
columns要写入的列名列表,不传则从第一条数据自动推导
data_startinteger数据起始行(1-based),默认 2

quick_sheets_batch_append

批量追加行到工作表,自动分片并带间隔。指定 overwrite_start 则从该行覆盖写入。

ParameterTypeDescription
data *array要追加的数据,每行一个 dict
sheet_id *string工作表 ID
spreadsheet_token *string电子表格 token
batch_intervalinteger每批追加间隔秒数,默认 2
batch_sizeinteger每批追加行数,默认 500
data_startinteger数据起始行(1-based),默认 2
overwrite_startTrue 从 data_start 覆写,int 从指定行覆写,None 使用 append 寻址

quick_sheets_sync_from_file

从本地 CSV 文件同步数据到工作表。CSV 第一行为表头,默认从 data_start 行开始覆盖写入。

ParameterTypeDescription
file_path *string本地 CSV 文件路径
sheet_id *string工作表 ID
spreadsheet_token *string电子表格 token
batch_sizeinteger每批写入行数,默认 5000
data_startinteger数据起始行(1-based),默认 2

quick_sheets_clear_content

清空工作表数据内容(不移除行)。指定 before_column 则只清空该列之前的所有列。

ParameterTypeDescription
sheet_id *string工作表 ID
spreadsheet_token *string电子表格 token
before_column指定列字母(如 "F"),只清空该列之前的所有列。不指定则清空全部列
data_startinteger数据起始行号,默认 2
keep_headerboolean是否保留首行表头,默认 true

quick_sheets_set_row_height

设置工作表的行高(自动分批,支持指定范围)。

ParameterTypeDescription
height *integer行高(点,1/72 英寸)
sheet_id *string工作表 ID
spreadsheet_token *string电子表格 token
end_row结束行号,不传则到最后一行
start_rowinteger起始行号,默认 2(跳过表头)

quick_sheets_set_column_style

批量设置列样式(自动分批),支持单列、多列或全部列。

ParameterTypeDescription
sheet_id *string工作表 ID
spreadsheet_token *string电子表格 token
style *object样式配置,传给 styles_batch_update 的 style 对象
columns指定列字母列表,如 ["A", "C"]。不传则全部列
end_row结束行号,不传则到最后一行
start_rowinteger起始行号,默认 2(跳过表头)

quick_sheets_clear_sheet

清空工作表数据(删除行),默认保留首行表头。

ParameterTypeDescription
sheet_id *string工作表 ID
spreadsheet_token *string电子表格 token
data_startinteger数据起始行号,默认 2
keep_headerboolean是否保留首行表头,默认 true

quick_sheets_write_image

向单元格写入图片,支持网络图片、本地文件、base64 三种来源。

ParameterTypeDescription
image_source *string图片来源:网络 URL(http/https)、本地文件路径、或 base64 字符串
range *string单元格范围,如 "sheetId!A1:A1"
spreadsheet_token *string电子表格 token
name图片文件名(含后缀),不传则自动从 image_source 提取