db_cleanup
Cleans up database tables by removing outdated search history, purging data by category or repository, and vacuuming to reclaim space.
Instructions
整理数据库表,清理不需要的历史数据。
当 db_inspect 发现数据太多或过时了,用这个工具清理。
Args: action: 操作类型 - "stats" 查看各表数据量(默认) - "purge_category" 删除指定类别的搜索历史(需传 category) - "purge_repo" 删除指定仓库的所有数据(需传 repo,格式 owner/repo) - "purge_all" 清空所有数据(慎重!) - "vacuum" 压缩数据库,回收空间 repo: 仓库名,格式 "owner/repo",配合 action="purge_repo" 使用 category: 类别名,配合 action="purge_category" 使用
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | ||
| action | No | ||
| category | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |