archive_data
Archive old messages or audit logs to reduce main table size. Specify data type, days threshold, and optionally vacuum the database after archiving.
Instructions
手动触发数据归档。将指定天数之前的记录从主表移入归档表,以减少主表体积。可归档 messages(默认 30 天前)或 audit_log(默认 90 天前)。仅 admin 可调用。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"type": "<type>"
},
"name": "archive_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | 归档多少天前的数据(messages 默认 30 天,audit_log 默认 90 天) | |
| type | Yes | 要归档的数据类型 | |
| vacuum | No | 归档后是否执行 VACUUM 压缩数据库文件 |