Get Database Info
getDatabaseInfoReturns the database type Uptime Kuma uses, SQLite file size, and monitor history retention days so you can verify storage and data retention settings.
Instructions
Returns which database Uptime Kuma stores its data in (sqlite, mariadb or embedded-mariadb), the SQLite file's size, and how many days of monitor history it keeps (keepDataPeriodDays). Uptime Kuma can only measure and shrink SQLite; for MariaDB the size is null.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "getDatabaseInfo"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | Yes | sizeBytes in KB / MB / GB | |
| dbType | Yes | sqlite, mariadb or embedded-mariadb; null if Uptime Kuma did not say | |
| canShrink | Yes | Whether shrinkDatabase does anything on this database | |
| sizeBytes | Yes | Size of the SQLite file; null for MariaDB | |
| keepDataPeriodDays | Yes | Days of heartbeats and daily statistics kept before the nightly cleanup deletes them; 0 keeps them forever. Change it with updateSettings. |