Skip to main content
Glama
mcp-uptime-kuma

mcp-uptime-kuma

Shrink Database

shrinkDatabase
Idempotent

Reclaim disk space by vacuuming the SQLite database after clearing history or lowering retention; it briefly blocks check recording while rewriting the file.

Instructions

Gives the space of deleted history back to the disk by rewriting the SQLite file (VACUUM). Run it after clearing history or lowering keepDataPeriodDays; it frees nothing otherwise. While it runs, Uptime Kuma cannot record checks, and it needs free disk space about the database's size. A large database takes minutes. SQLite only: refused on MariaDB, where Uptime Kuma has nothing to do. Returns the size before and after.

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": "shrinkDatabase"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
okYes
freedYesThe difference, in KB / MB / GB
sizeAfterYesBytes after shrinking
sizeBeforeYesBytes before shrinking

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.17.0

TDQS

A4.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations by disclosing the blocking side effect ('Uptime Kuma cannot record checks'), the disk-space prerequisite, and the multi-minute runtime for large databases. The only mild inconsistency is calling this non-destructive while warning it blocks all check recording, but no annotation is actually contradicted since VACUUM preserves data and is repeatable, matching destructiveHint=false and idempotentHint=true.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences, front-loaded with what it does, then when to run it, then operational costs. Every sentence carries distinct information: mechanism, trigger, blocking effect, disk requirement, duration, platform limit, and return value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter maintenance operation, the definition covers trigger conditions, platform restriction, downtime, disk prerequisites, expected duration, and return values (sizes before and after). Nothing an agent needs in order to decide whether to invoke it is missing, even though an output schema also exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so there is no parameter meaning to add and the baseline applies. The description correctly avoids inventing options and instead spends its words on behavior and prerequisites.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Gives the space of deleted history back to the disk by rewriting the SQLite file (VACUUM)') and names the underlying mechanism, so an agent knows exactly what operation occurs. It is clearly distinct from siblings like clearAllStatistics or clearMonitorHeartbeats, which delete data rather than reclaim file space.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger ('Run it after clearing history or lowering keepDataPeriodDays') and an explicit exclusion ('it frees nothing otherwise'), plus a platform gate ('SQLite only: refused on MariaDB'). Both the when and the when-not are stated rather than inferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.