batch_delete_bitable_records
Delete multiple records from Feishu Bitable tables in bulk to manage data efficiently. Specify app token, table ID, and record IDs to remove selected entries.
Instructions
批量删除多维表格记录
参数:
app_token: 多维表格的token
table_id: 数据表ID
record_ids: 要删除的记录ID列表
返回:
删除结果
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_token | Yes | ||
| table_id | Yes | ||
| record_ids | Yes |
Implementation Reference
- The handler function decorated with @mcp.tool() that implements the batch deletion of bitable records using the Feishu (Lark) API. It constructs a BatchDeleteAppTableRecordRequest and calls the API.@mcp.tool() @handle_feishu_error def batch_delete_bitable_records( app_token: str, table_id: str, record_ids: list[str] ) -> str: """ 批量删除多维表格记录 参数: app_token: 多维表格的token table_id: 数据表ID record_ids: 要删除的记录ID列表 返回: 删除结果 """ client = get_client() request = ( BatchDeleteAppTableRecordRequest.builder() .app_token(app_token) .table_id(table_id) .request_body( lark.BatchDeleteAppTableRecordRequestBody.builder() .records(record_ids) .build() ) .build() ) response = client.bitable.v1.app_table_record.batch_delete(request) return lark.JSON.marshal(response.data, indent=4)
- src/yuppie_mcp_feishu/__init__.py:19-21 (registration)Within the create_mcp_server function, this calls register_bitable_record_tools(mcp), which defines and registers the batch_delete_bitable_records tool via its @mcp.tool() decorator.# 注册多维表格工具 register_bitable_app_tools(mcp) register_bitable_record_tools(mcp)