Skip to main content
Glama
ninetails-io

gnucash-mcp

create_backup

Read-only

Create a verified SQLite backup of a GnuCash book, even during active use, with an optional label. Restore instructions are provided in the response.

Instructions

Create an on-demand backup of the GnuCash book.

Uses SQLite's online backup API so the snapshot is safe even if the book is being read or written concurrently by GnuCash desktop. Verifies the copy with PRAGMA integrity_check before declaring success; a failed check deletes the bad backup and raises.

Manual backups are kept indefinitely — automatic retention (session / weekly / monthly stages) does not touch them. To review or remove backups, the user works with the files directly in the backup directory; no tool can list or delete them.

The response includes a restore_hint describing the filesystem command to restore from this backup. Restore is a human-run filesystem operation, not an MCP tool — see docs/RESTORE_FROM_BACKUP.md for details.

Args: label: Optional free-text label (sanitized to [A-Za-z0-9_-]) appended to the filename for human context, e.g. "pre-recategorization" or "pre-tax-filing".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.2

TDQS

A4/5.0
Behavior1/5

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

The description adds rich behavioral detail: SQLite online backup API, concurrent safety, integrity_check, delete-and-raise on failure, and retention semantics. However, annotations declare readOnlyHint=true while the description describes creating backup files and deleting bad backups, which is a direct annotation contradiction.

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?

Though multi-paragraph, every sentence earns its place: safety, failure handling, retention, restore workflow, and parameter semantics. The core action is front-loaded in the first sentence.

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 single-parameter backup tool with an output schema, the description covers concurrency safety, verification, failure cleanup, retention, restore instructions, and response contents. Nothing needed to call or interpret the tool is missing.

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

Parameters5/5

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

Schema coverage is 0% and the schema only names the field as 'Label'. The description fully compensates by explaining that label is optional, free-text, sanitized to [A-Za-z0-9_-], appended to the filename, and provides concrete examples.

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: 'Create an on-demand backup of the GnuCash book.' This is immediately distinguishable from all siblings, none of which perform backup creation.

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

Usage Guidelines4/5

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

Implied usage is clear for on-demand backups, and the description explicitly warns that no tool can list or delete backups and that restore is a human-run filesystem operation. This prevents agents from searching for nonexistent sibling capabilities, though it does not state formal 'use this when' exclusions.

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